Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #25 from christopherhein/chore/10-development-guides
Browse files Browse the repository at this point in the history
Adding Base Development Guidelines
  • Loading branch information
Christopher Hein authored Aug 2, 2018
2 parents 50c238b + 370c6db commit 178bb93
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions development.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
= Development

Make sure you first have all the dependencies installed.

[source,shell]
----
brew install dep
brew upgrade dep
dep ensure
----

If you want to make changes to the operators, they are all generated code, to
modify them you will need to install the `aws-operator-codegen` project by
running.

[source,shell]
----
go get -u github.com/christopherhein/aws-operator-codegen
----

After you have this installed you can run the following from the root of the
project.

[source,shell]
----
aws-operator-codegen process
----

This takes the model files that are in `models/` and converts them into the
operator code in `pkg/operator`

Once you have run this you can then use the Kubernetes code generation libraries
to auto generate the `pkg/client`.

[source,shell]
----
./codegen.sh
----

After have made sure the codegen is run you can then build the package and
run it against a remote cluster by passing in the `kubeconfig` file.

```bash
make build && ./aws-operator server --kubeconfig ~/.kube/config --region
us-west-2
```

== Writing Additional Operators

Additional Custom Resource Definitions and Controllers can be created and
deployed using the build in model file to controller logic. Because each
resource is defined using Cloudformation we have a simple to use DSL for adding
additional resources.

0 comments on commit 178bb93

Please sign in to comment.