Video Demo: https://asciinema.org/a/8oRlcN3eumfXZcgEkbKClyqFw
examples are in kube-example folder
operator-sdk init --domain custom --repo DynamicConfigMapPropagator
Update makefile for accessing the controller-gen, set the following to Makefile
CONTROLLER_GEN ?= $(GOBIN)/controller-gen
Create ConfigMapSyncer Api.
operator-sdk create api --group syncer --version v1alpha1 --kind ConfigMapSyncer --resource --controller --namespaced=true
make manifests
make generate
make docker-build docker-push
kubectl apply -f kube/crds/
kubectl apply -f kube/manifests/namespace.yaml
kubectl apply -f kube/manifests/rbac.yaml
kubectl apply -f kube/manifests/controller.yaml
kubectl apply -f kube/custom-resource/configmapsyncer.yaml
kubectl apply -f kube/configmaps/master-cm-one.yaml
kubectl apply -f kube/configmaps/random-cm.yaml