A SecretWatcher CRD which watches for any change made against a Secret Resource
operator-sdk init --domain secretwatcher.aly.com --repo github.com/AlyRagab/secret-watcher-crd # Scafollds the project
operator-sdk create api --group secretwatcher --version v1 --kind SecretWatcher --resource --controller # Creates the API
make manifests # Creates the Yaml definition
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifests
- Install Instances of Custom Resources:
kubectl apply -f config/samples/
- Build and push your image to the location specified by
IMG
:
make docker-build docker-push IMG=<some-registry>/secret-watcher-crd:tag
- Deploy the controller to the cluster with the image specified by
IMG
:
make deploy IMG=<some-registry>/secret-watcher-crd:tag
To delete the CRDs from the cluster:
make uninstall
UnDeploy the controller from the cluster:
make undeploy
- Install the CRDs into the cluster:
make install
- Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
make run
NOTE: You can also run this in one step by running: make install run