https://github.com/andy2046/rekonfig
up to date configuration for Deployment / StatefulSet / DaemonSet
https://github.com/andy2046/rekonfig
cloud-infrastructure configmap daemonset deployment kubernetes operator operator-sdk secret statefulset
Last synced: 2 months ago
JSON representation
up to date configuration for Deployment / StatefulSet / DaemonSet
- Host: GitHub
- URL: https://github.com/andy2046/rekonfig
- Owner: andy2046
- License: bsd-3-clause
- Created: 2019-06-14T06:56:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-28T06:30:30.000Z (over 6 years ago)
- Last Synced: 2025-03-20T23:27:32.243Z (7 months ago)
- Topics: cloud-infrastructure, configmap, daemonset, deployment, kubernetes, operator, operator-sdk, secret, statefulset
- Language: Go
- Homepage:
- Size: 25.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```bash
$ 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`.
```yaml
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: ""
# ...
```## Test
```bash
$ make test
```## Build
```bash
$ make build
```