Sync ConfigMaps and Secrets between namespaces.
Builds can be at Docker Hub
Docker image can be fetched with docker pull n1koo/konfig-syncer
konfig-syncer uses konfig-syncer annotation for figuring out which objects should be synced and to which destionation Namespaces.
tl;dr
konfig-syncer: ""annotation on object -> sync to all namespaceskonfig-syncer: "foo=barannotation on object -> sync to namespaces that havefoo: barlabel
-kubeconfigto point to kubeconfig-masterto override master address in kubeconfig-human-readable-logsfor disabling json logging output-debugflag to get more verbose logging
The value of the annotation (eg. konfig-syncer: special-ns=true) is used as label selector for finding the namespaces that have this label. Objects will be created/updated in to the matching namespaces.
If value of the annotation is empty (eg. konfig-syncer: "") the obejct will be synced to all namespaces.
If a new Namespace is created we check what objects should be inserted in to it.
The "origin" object is used as source of truth for updates. So if you change the data in this object the change will be propagated to all copied versions too.
If Namespaces labels get updated we sync what objects still belong to it (eg. create missing, delete the ones that are not required anymore)
If the origin object is deleted the copied objects will also be deleted.
You can find example k8s and helm templates in the deploy dir
- tests :(
- Fix name collisions (eg. figure out what should happen if theres two objects with same name in different NS trying to sync to third)