linkerd / linkerd/linkerd2

helm chart support for arbitrary labels and annotations

Open
#4,537 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/helm help wanted
Dominant language
Go
Stars
11.5k
Forks
1.4k
Avg merge
3d 22h
Merged PRs (30d)
53

Description

## 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with proxy-injector.yaml and review the chart templates for each Deployment and Service it creates. Follow the existing values and toYaml pattern for labels and annotations, then verify that arbitrary user-provided metadata can be configured consistently across all chart-created resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.