-
Notifications
You must be signed in to change notification settings - Fork 136
Add a simple Kubernetes custom controller/resource example. #55
Conversation
The OSX issue looks the same as this |
113fd62
to
571d385
Compare
6e45567
to
572ad57
Compare
Ok, I expect this is RFAL |
69142a8
to
4262fbb
Compare
ports: | ||
- containerPort: 50051 | ||
env: | ||
- name: MY_NAMESPACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also get this from /var/run/secrets/kubernetes.io/serviceaccount/namespace and avoid using the downward API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat, but I'd rather avoid reading a file :-/
kind: Todo | ||
# # shortNames allow shorter string to match your resource on the CLI | ||
# shortNames: | ||
# - todo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
bazel run examples/todocontroller/example-todo.describe | ||
bazel run examples/todocontroller/${LANGUAGE}:controller-deployment.describe | ||
|
||
bazel build examples/todocontroller/example-todo.delete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not bazel run everything in here, instead of bazel building then executing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want coverage of separate build/run working :)
This has a handful of components: - a "TODO" Custom Resource Definition (CRD), - a "TODO" example instance, and - a Custom Controller that watches for "TODOs" not marked "done" and completes them with a comment. This also adds a little e2e test that: - Creates the CRD/Controller and starter TODO - Checks the note on the TODO - Updates the Controller (waits) and then the TODO (waits) - Checks the note on the TODO has changed appropriately - Repeat edit/check - Teardown
This has a handful of components:
This also adds a little e2e test that:
Fixes: #30