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!
https://docs.stakater.com/reloader/
Apache License 2.0
7.45k stars 493 forks source link

Defeault release label conflicts with Podmonitor #422

Open githubcdr opened 1 year ago

githubcdr commented 1 year ago

The release label can be used to specifiy the Prometheus instance.

In https://github.com/stakater/Reloader/blob/master/deployments/kubernetes/chart/reloader/templates/_helpers.tpl#L26 a release label is already added generating this error;

line 11: mapping key "release" already defined at line 8

Can this be changed? Or is there another way to specify the release label for a podmonitor?

joebowbeer commented 6 months ago

These unqualified app, chart, release and heritage labels were added a long time ago, and are likely to conflict with other tenants in addition to prometheus:

{{- define "reloader-labels.chart" -}}
app: {{ template "reloader-fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
{{- end -}}