This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from christopherhein/chore/10-development-guides
Adding Base Development Guidelines
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |