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

There is no way to add custom labels to the Pods which would be useful #96

Open
mlintern opened this issue Sep 26, 2024 · 1 comment
Open

Comments

@mlintern
Copy link

Currently, there is not a way to add custom labels to the pods. The only labels that get added to the pods are selectorLabels, which you are not able to add custom labels to. There are a couple options to allow custom pod labels.

  1. Use the harness-delegate-ng.labels for pods as well.
  2. Add a new variable to include additional labels to pods. See below:

Suggested changes:

diff --git a/harness-delegate-ng/templates/deployment.yaml b/harness-delegate-ng/templates/deployment.yaml
index 26e7a13..06b4e06 100644
--- a/harness-delegate-ng/templates/deployment.yaml
+++ b/harness-delegate-ng/templates/deployment.yaml
@@ -23,6 +23,7 @@ spec:
         checksum/configmap: {{ include (print .Template.BasePath "/configMap.yaml") . | sha256sum | trunc 63 }}
       labels:
         {{- include "harness-delegate-ng.selectorLabels" . | nindent 8 }}
+        {{- toYaml .Values.additionalPodLabels | nindent 8 }}
     spec:
       serviceAccountName: {{ include "harness-delegate-ng.serviceAccountName" . }}
       terminationGracePeriodSeconds: 600
diff --git a/harness-delegate-ng/values.yaml b/harness-delegate-ng/values.yaml
index f8a5847..df75968 100644
--- a/harness-delegate-ng/values.yaml
+++ b/harness-delegate-ng/values.yaml
@@ -232,6 +232,9 @@ ccm:
 additionalLabels: {}
 #  nologging: "true"
 
+# Use this field to add additional pod labels
+additionalPodLabels: {}
+
 dnsConfig: {}
 #  nameservers:
 #    - 1.2.3.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants