vmware-archive / operator-builder

A Kubebuilder plugin to accelerate the development of Kubernetes operators
MIT License
41 stars 6 forks source link

feat(companion-cli): add controller deployment manifests / crds to companion cli deploy command #286

Open scottd018 opened 2 years ago

scottd018 commented 2 years ago

For offline scenarios, it would be nice to only have to ship the binary to the offline environment and be able to deploy the manifests for the controller (taking into consideration that another process must exist to ship the image).

Something like:

myappctl crds install   # << deploys the generated crds
myappctl controller deploy --image myrepo/myimage:v1 --namespace my-controller-namespace   # << deploys the generated controller manifests

# or perhaps
myappctl controller deploy --image myrepo/myimage:v1 --namespace my-controller-namespace --crds   # << deploys the generated controller manifests with crds

This would more easily facilitate the idea of offline environments for completely air-gapped networks. Additionally, we can do things like ensure the image is locked down for those who need more secure scenarios.

NOTE: will likely have to tie into kustomize/controller-gen APIs to do such a thing as that is currently what is generating the manifests.

scottd018 commented 2 years ago

also relates to #118 as this would move the crd deployment into the companion cli as well (since they are prereqs)