An operator to safely restart pods when configuration changes.
Configsyncop will watch your configmaps and secrets. If any annotated secret/configmap is modified, it will perform a rollout for any deployment, daemonset or statefulset using that secret/configmap.
- Install RBAC permissions:
kubectl apply -f rbac.yaml
- Install main operator:
kubectl apply -f deployment.yaml
- Annotate your configmaps or secrets with
k8s.config.sync.manage: "true"
. - Annotate your namespaces with
k8s.config.sync.manage/Secret: "true"
and/ork8s.config.sync.manage/ConfigMap: "true"
to manage all Secrets or ConfigMaps in that namespace.
The folder example
contains dummy secrets and configmaps. Just install them:
kubectl apply -f example/secret.yaml
kubectl apply -f example/configmap.yaml
Then you can install the deployments, daemonsets or statefulsets you want. There are four flavours:
- *-env-secret.yaml: uses the secret as an environment variable.
- *-volume-secret.yaml: uses the secret as a volume.
- *-env-cm.yaml: uses the configmap as an environment variable.
- *-volume-cm.yaml: uses the configmap as a volume.
Automatically exposes Prometheus metrics on port 9090.