Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds the scaffolding for the test-operator in versions v1 and v2 using operator-sdk. The test-operator is a basic echo service.
The test-operator supports AllNamespaces, SingleNamespace, and OwnNamespace install modes.
v1 has validating and mutating webhooks
v2 has validating, mutating and conversion webhooks
TODO
test/test-operator/Makefile
: tie in the building of the controllers, bundles, and catalogtest/test-operator/test-operator-catalog.json
: test-operator package catalogThing we should feel confident in doing in the future
Risks
v1
A reconciled test-operator v1 resource would look like this:
The v1 operator also includes a validating and mutating webhook. The validating webhook validates
.spec.message
against a keyword and rejects admission if its found. The mutating webhook is used as a "defaulting" webhook that sets.spec.message
to the default message ofEcho
.v2
A reconciled test-operator v2 resource would look like this:
The same webhooks are available for v2 apis + a conversion webhook to support the CRD upgrade.
Reviewer Checklist