IngressMonitorController icon indicating copy to clipboard operation
IngressMonitorController copied to clipboard

missing global.labels in pods

Open Boeller666 opened this issue 2 years ago • 3 comments

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.

Boeller666 avatar Sep 18 '23 12:09 Boeller666

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

MuneebAijaz avatar Sep 20 '23 08:09 MuneebAijaz

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:

nohant avatar Oct 03 '23 14:10 nohant

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

github-actions[bot] avatar Dec 03 '23 01:12 github-actions[bot]