Sync selected secrets and configmaps across namespaces.
NSync keeps an eye on all secrets and configmaps in the current namespace that have the annotaion nsync.verloop.io/managed="true"
Whenever it encounters a namespace with the annotation nsync.verloop.io/managed="true"
, it starts syncing the secrets and configmaps to the namespace.
go get -u github.com/verloop/nsync
dep ensure
nsync --kubeconfig=$HOME/.kube/config
kubectl run verloop-nsync --image=verloopio/nsync:0.1.0
kubectl create ns hello
kubectl annotate namespace/hello nsync.verloop.io/managed="true" --overwrite
kubectl create secret generic my-secret --from-literal=super=secret
kubectl annotate secrets/my-secret nsync.verloop.io/managed="true" --overwrite
kubectl create configmap global-config --from-literal=hello=world
kubectl annotate configmap/global-config nsync.verloop.io/managed="true" --overwrite
CGO_ENABLED=0 GOOS=linux go build -ldflags "-s" -a -installsuffix cgo -o deploy/files/nsync .
docker build -t verloopio/nsync .
docker push verloopio/nsync
We run on a 1 namespace per customer model.
I needed something to copy over common secrets and configmaps.
Because it's gonna be me.