andy2046 / rekonfig

up to date configuration for Deployment / StatefulSet / DaemonSet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rekonfig

Rekonfig monitors Deployment and ConfigMap/Secret mounted, ensures that each Deployment's Pod always have up to date configuration.

Whenever a ConfigMap or Secret is updated, Rekonfig trigger a Rolling Update of the Deployment.

Installation

To deploy Rekonfig to a Kubernetes cluster.

$ kubectl apply -f ./deploy

Configuration

Rekonfig watches all Deployment within a Kubernetes cluster but only processes those with the annotation rekonfig.gitops.in/update-on-konfig-change: "true".

As shown below, once enabled, Rekonfig will set the configuration hash as an annotation rekonfig.gitops.in/konfig-hash on the Deployment's PodTemplate.

apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  annotations:
    rekonfig.gitops.in/update-on-konfig-change: "true"
  labels:
    app: my-app
  name: my-app
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  serviceName: my-app-headless
  template:
    metadata:
      annotations:
        rekonfig.gitops.in/konfig-hash: "<SHA256_HASH>"
# ...

Test

$ make test

Build

$ make build

About

up to date configuration for Deployment / StatefulSet / DaemonSet

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 97.7%Language:Shell 1.8%Language:Dockerfile 0.4%Language:Makefile 0.2%