linkerd2 icon indicating copy to clipboard operation
linkerd2 copied to clipboard

helm chart support for arbitrary labels and annotations

Open ConnorGraham opened this issue 6 years ago • 4 comments

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

ConnorGraham avatar Jun 02 '20 14:06 ConnorGraham

Sounds reasonable! Are you up for a PR?

grampelberg avatar Jun 02 '20 16:06 grampelberg

Sure. It's my first time contributing

ConnorGraham avatar Jun 03 '20 13:06 ConnorGraham

Cool! We're in the #contributors channel in slack if you have any questions =)

grampelberg avatar Jun 03 '20 15:06 grampelberg

@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?

Luke-Vear avatar Jul 15 '20 12:07 Luke-Vear