stakater / Reloader

A Kubernetes controller to watch changes in ConfigMap and Secrets and do rolling upgrades on Pods with their associated Deployment, StatefulSet, DaemonSet and DeploymentConfig – [✩Star] if you're using it!

Home Page:https://docs.stakater.com/reloader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ENHANCE] add possibility to watch a configmap located in another namespace

ZeBidule opened this issue · comments

Is your feature request related to a problem? Please describe.
I would like to restart all my pod that have an istio sidecar when the istio tag version change.

Describe the solution you'd like
I propose to allow that the namespace is mentioned in the reloader anotation like this :

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
  namespace: test
  annotations:
    configmap.reloader.stakater.com/reload: istio-system/stable-tag
...

In order for this deployment to be rolled out when my configmap in istio namespace change :

apiVersion: v1
kind: ConfigMap
metadata:
  name: stable-tag
  namespace: istio-system
data:
  version: 1-16-7

Describe alternatives you've considered
If it is not possible I will try to use Kyverno to do that but it is more complex to setup (https://kyverno.io/policies/other/res/restart-deployment-on-secret-change/restart-deployment-on-secret-change/).

@ZeBidule we welcome Pull Requests, feel free to create one. This seems like a valid enhancement/usecase.