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

missing global.labels in pods #519

Open
Boeller666 opened this issue Sep 18, 2023 · 3 comments
Open

missing global.labels in pods #519

Boeller666 opened this issue Sep 18, 2023 · 3 comments
Labels
kind/enhancement New feature or request kind/help wanted Extra attention is needed stale

Comments

@Boeller666
Copy link

We need to set some labels by default to our deployments/pods.

global.labels does not attach these labels to the pods.

Please add

{{- if .Values.global.labels }}
{{ toYaml .Values.global.labels }}
{{- end }}

to the deployment.yaml or create another podLabels helper method that includes the global labels.

@MuneebAijaz MuneebAijaz added kind/enhancement New feature or request kind/help wanted Extra attention is needed labels Sep 20, 2023
@MuneebAijaz
Copy link
Contributor

@Boeller666 hi, we welcome Pull Requests if you are willing to resolve this issue

@nohant
Copy link
Contributor

nohant commented Oct 3, 2023

The chart at version 2.1.38, with this values.yml

global:
  labels:
    app: ingressmonitorcontroller

generates this kind of configuration inside the deployment:

monitoring, ingressmonitorcontroller, Deployment (apps) has changed:
  # Source: ingressmonitorcontroller/templates/deployment.yaml
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: ingressmonitorcontroller
    namespace: monitoring
    labels:
      helm.sh/chart: ingressmonitorcontroller-2.1.38
      app.kubernetes.io/name: ingressmonitorcontroller
      app.kubernetes.io/instance: ingress-monitor-controller
      app.kubernetes.io/version: "2.1.38"
      app.kubernetes.io/managed-by: helm
+     app: ingressmonitorcontroller
      control-plane: controller-manager

due to the configuration in the file helpers.
@Boeller666 you instead need the spec.template.labels?

    template:
      metadata:
        labels:
          app.kubernetes.io/name: ingressmonitorcontroller
          app.kubernetes.io/instance: ingress-monitor-controller
+         app: ingressmonitorcontroller
      spec:

Copy link

github-actions bot commented Dec 3, 2023

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request kind/help wanted Extra attention is needed stale
Projects
None yet
Development

No branches or pull requests

3 participants