Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility do add common labels in helm chart #9067

Open
d-mankowski-synerise opened this issue Aug 21, 2024 · 2 comments · May be fixed by #9742
Open

Add possibility do add common labels in helm chart #9067

d-mankowski-synerise opened this issue Aug 21, 2024 · 2 comments · May be fixed by #9742
Labels
enhancement New feature or request good first issue Good for newcomers helm

Comments

@d-mankowski-synerise
Copy link

d-mankowski-synerise commented Aug 21, 2024

Is your feature request related to a problem? Please describe.

A lot of Helm charts (e.g. kube-prometheus-stack, cert-manager) allow to define key commonLabels, which results in a set of custom labels added to every resource created by the chart (pods, deployments, statefulsets, ingresses, services, servicemonitors, crds, etc.). Right now it is not even possible to add custom labels to Mimir's deployments or statefulsets (other than by using kustomize).

Use case: e.g. we want to have generic alerts (like: pod is crashlooping) that are dynamically routed, based on the label team (on the same cluster there is stuff deployed by various teams)

Describe the solution you'd like

In values.yaml we should be able to specify something like this:

commonLabels:
  label1: value1
  label2: value2

and all resources created by Mimir chart will have those labels

@Rohlik
Copy link

Rohlik commented Sep 17, 2024

This is necessary for having common alerts and route them based on label(s).
Having the option (below) to add labels to just pods is not enough.

global:
  podLabels:
    owner: best_team

@ftrigari
Copy link

ftrigari commented Oct 26, 2024

I created a PR.

All objects created by Helm now have the commonLabels key except for subchart object.
I also put commonLabels in podLabels because it might be useful, if it's just my opinion tell me and I'll remove it.

It's important to keep the same values from the other projects mentioned, so lgtm chart could apply them to all its subchart.

Regarding Mimir's dependencies, how would you like to proceed? Should I open separate issue for rollout-operator and grafana-object-operator and link them to this one?

For MinIO chart the only solution is to open an issue and develop it. Do you have any better ideas?

Update

I created PRs for agent-operator and rollout-operator charts with the same logic used for Mimir chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers helm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants