helm chart support for arbitrary labels and annotations
Feature Request
I would like the ability to add arbitrary labels and annotations to any deployment or service created by the chart
What problem are you trying to solve?
The issue I am personally trying to solve is how to add a cluster-autoscaler.kubernetes.io/safe-to-evict: 'false' label to the proxy-injector so I don't have new pods potentially falling out of the service mesh during a simultaneous autoscaling event and deployment. There are many other use cases that depend on an individual's needs.
How should the problem be solved?
What do you want to happen? Add any considered drawbacks.
Looking at proxy-injector.yaml, There exists the following labels spec
labels:
app.kubernetes.io/name: proxy-injector
app.kubernetes.io/part-of: Linkerd
app.kubernetes.io/version: {{default .Values.global.linkerdVersion .Values.global.controllerImageVersion}}
{{.Values.global.controllerComponentLabel}}: proxy-injector
{{.Values.global.controllerNamespaceLabel}}: {{.Values.global.namespace}}
Adding something like below would allow users of the chart to add their own arbitrary labels
{{- if .Values.proxy-injector.labels}}
{{ toYaml .Values.proxy-injector.labels | indent 6 }}
{{- end }}
This pattern can be repeated for annotations and labels across all Deployments and Services created by the chart
Sounds reasonable! Are you up for a PR?
Sure. It's my first time contributing
Cool! We're in the #contributors channel in slack if you have any questions =)
@ConnorGraham I noticed this/the pull request/the fork branch has not moved since 5 June, if you don't want to continue it I could take a look?