martin-helmich / kubernetes-replicator

Kubernetes controller for synchronizing secrets & config maps across namespaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConfigMap & Secret replication for Kubernetes

Docker Repository on Quay Build Status

This repository contains a custom Kubernetes controller that can be used to make secrets and config maps available in multiple namespaces.

Deployment

$ # Create roles and service accounts
$ kubectl apply -f https://raw.githubusercontent.com/mittwald/kubernetes-replicator/master/deploy/rbac.yaml
$ # Create actual deployment
$ kubectl apply -f https://raw.githubusercontent.com/mittwald/kubernetes-replicator/master/deploy/deployment.yaml

Usage

Add the annotation replicator.v1.mittwald.de/replicate-from to any Kubernetes secret or config map object. The value of that annotation should contain the the name of another secret or config map (using <namespace>/<name> notation).

apiVersion: v1
kind: Secret
metadata:
  annotations:
    replicator.v1.mittwald.de/replicate-from: default/some-secret
data: {}

The replicator will then copy the data attribute of the referenced object into the annotated object and keep them in sync.

About

Kubernetes controller for synchronizing secrets & config maps across namespaces

License:Apache License 2.0


Languages

Language:Go 100.0%