stakater / IngressMonitorController

A Kubernetes controller to watch ingresses and create liveness alerts for your apps/microservices in UptimeRobot, StatusCake, Pingdom, etc. – [✩Star] if you're using it!
https://stakater.com
Apache License 2.0
578 stars 102 forks source link

[ENHANCE] Allow configuring annotations for Deployment #574

Closed dennis-ge closed 4 months ago

dennis-ge commented 4 months ago

Is your feature request related to a problem? Please describe. I would like to use the stakater Reloader in combination with the IngressMonitorController to automatically restart the IngressMonitorController deployment as soon as a secret is updated. The reason I would like to have this functionality is that I use a secret in the envFrom section of the deployment, but when the secret is updated with new information a restart is necessary for the controller to read the new data.

As per How To Use Reloader, an annotation on the deployment is necessary so that the reloader controller can restart the deployment.

Describe the solution you'd like I would like to make the annotations of the deployment configurable in the helm chart. There is already podAnnotations so I would propose deploymentAnnotations:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "ingress-monitor-controller.fullname" . }}
  namespace: {{ include "ingress-monitor-controller.namespace" . }}
{{- with .Values.deploymentAnnotations }}
   annotations:
   {{- toYaml . | nindent 4 }}
{{- end }}
...

Describe alternatives you've considered I am also open for other names/ways to realize this, it doesn't have to be deploymentAnnotations.

Additional context I can also provide a PR if wanted.

MuneebAijaz commented 4 months ago

hi @dennis-ge , thanks for pointing out the issue. Feel free to open a relevant PR to resolve this. In my opinion, the correct way would have been to use .Values.deployment.annotations but since .Values.deployment part isnt how the chart is made, your suggested .Values.deploymentAnnotations would be better.