Skip to content

Operator responsible for gracefully restart pods when depended resources change

Notifications You must be signed in to change notification settings

HansK-p/triggered-rollout-restart-operator

Repository files navigation

triggered-rollout-restart-operator

It is recommended to use https://github.com/stakater/Reloader instead.

Operator responsible for gracefully restart pods when depended resources change

This oprator is based on the Operator SDK and is used on order to make sure that pods are gracefully restarted after secrets have been updated by Kubernetes Replicator or similar software.

The idea is to create a CRD in the same namespace as the secret and the pods to be restarted with a content like:

apiVersion: reload-restart-trigger.k8s.faith/v1alpha1
kind: ResourceReloadRestartTrigger
metadata:
  name: nginx
  namespace: website
spec:
  triggers:
  - name: nginx-config
    kind: ConfigMap
  - name: cert-tls
    kind: Secret
  targets:
  - kind: Deployment
    name: nginx

A docker image will be published at irregular intervals as k8sfaith/triggered-rollout-restart-operator.

Suggested RBAC rules when deploying the Operator are. See the deploy folder for files needed for a deployment.

About

Operator responsible for gracefully restart pods when depended resources change

Resources

Stars

Watchers

Forks

Packages

No packages published