gissilabs / charts

Apache License 2.0
38 stars 22 forks source link

Add podLabels map #22

Closed Odernor closed 3 years ago

Odernor commented 3 years ago

Hi Slivio,

could you please add a podLabel map just like the podAnnotations map ?

diff --git a/vaultwarden/README.md b/vaultwarden/README.md
index 3604e00..a41f0c3 100644
--- a/vaultwarden/README.md
+++ b/vaultwarden/README.md
@@ -146,6 +146,7 @@ serviceAccount.create | Create Service Account | true / false | false
 serviceAccount.annotations | Annotations service account | Map | Empty
 serviceAccount.name | Service Account name | Text | Generated from template
 podAnnotations | Pod Annotations | Map | Empty
+podLabels | Pod Labels | Map | Empty
 podSecurityContext | Pod-level Security Context | Map | {fsGroup:65534}
 securityContext | Container-level Security Context | Map | {runAsUser:65534, runAsGroup:65534}
 resources | Deployment Resources | Map | Empty
diff --git a/vaultwarden/templates/deployment.yaml b/vaultwarden/templates/deployment.yaml
index 3105d4f..9a01aa9 100644
--- a/vaultwarden/templates/deployment.yaml
+++ b/vaultwarden/templates/deployment.yaml
@@ -21,6 +21,7 @@ spec:
     {{- end }}
       labels:
         {{- include "vaultwarden.selectorLabels" . | nindent 8 }}
+        {{- toYaml .Values.podLabels | nindent 8 }}
     spec:
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets:
diff --git a/vaultwarden/values.yaml b/vaultwarden/values.yaml
index bff2c53..8b09a6e 100644
--- a/vaultwarden/values.yaml
+++ b/vaultwarden/values.yaml
@@ -196,6 +196,7 @@ serviceAccount:
   name: ""

 podAnnotations: {}
+podLabels: {}

 podSecurityContext:
   fsGroup: 65534
sgissi commented 3 years ago

Thanks for raising this, I'm Ok with your suggestion. If you open a PR, GitHub (and git history) will show your contribution more explicitly. If you don't want to raise the PR, I'll go ahead and include the proposed changes in the next release. It should come around by the weekend.

sgissi commented 3 years ago

Hi, the new chart was just released including your suggestion above. Can you give it a try and let me know please?

sgissi commented 3 years ago

@Odernor I'm closing the issue as the new charts are released with your suggestion. Feel free to reopen if you get into any issues. Thanks for raising the issue and the suggested implementation!

Odernor commented 3 years ago

@sgissi Many thanks for adding podLabels. have tried it and everything works as expected.