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

helm chart podlabels and deployment labels can't be passed from values file #558

Open
prashanth-cbsi opened this issue Jul 16, 2024 · 0 comments
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@prashanth-cbsi
Copy link

Description

In the file charts/nri-metadata-injection/templates/deployment.yaml we have included {{- include "newrelic.common.labels" . | nindent 4 }} and for pods {{- include "newrelic.common.labels.podLabels" . | nindent 8 }} , but these are not defined in the file charts/nri-metadata-injection/templates/_helpers.tpl
Also add labels and podLabels to be able to read from values file.

Expected Behavior

in the file charts/nri-metadata-injection/templates/deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "newrelic.common.naming.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include ".Values.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicas }}
  selector:
    matchLabels:
      {{- /* We cannot use the common library here because of a legacy issue */}}
      {{- /* `selector` is immutable  and the previous chart did not have all the idiomatic labels */}}
      app.kubernetes.io/name: {{ include "newrelic.common.naming.name" . }}
  template:
    metadata:
      {{- if .Values.podAnnotations }}
      annotations:
        {{- toYaml .Values.podAnnotations | nindent 8 }}
      {{- end }}
      labels:
        {{- include ".Values.podLabels" . | nindent 8 }}

For Maintainers Only or Hero Triaging this bug

Suggested Priority : P3
Suggested T-Shirt size : S

@prashanth-cbsi prashanth-cbsi added the bug Categorizes issue or PR as related to a bug. label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant