Skip to content

Commit

Permalink
Add podLabels and extraLabels to the helm template. (#9)
Browse files Browse the repository at this point in the history
Add podLabels and extraLabels into the Helm template. The first let's you set the Deployment labels, the second the pod labels.
  • Loading branch information
DanTulovsky authored Sep 23, 2022
1 parent 996a673 commit 09395d8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ include "spacelift-worker.fullname" . }}
labels:
{{- include "spacelift-worker.labels" . | nindent 4 }}
{{- with .Values.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -18,6 +21,9 @@ spec:
{{- end }}
labels:
{{- include "spacelift-worker.selectorLabels" . | nindent 8 }}
{{- with .Values.extraPodLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
6 changes: 6 additions & 0 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ include "spacelift-worker.fullname" . }}
labels:
{{- include "spacelift-worker.labels" . | nindent 4 }}
{{- with .Values.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -19,6 +22,9 @@ spec:
{{- end }}
labels:
{{- include "spacelift-worker.selectorLabels" . | nindent 8 }}
{{- with .Values.extraPodLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

extraLabels: {}
podAnnotations: {}
extraPodLabels: {}
podSecurityContext: {}

# launcher contains settings for the launcher container.
Expand Down

0 comments on commit 09395d8

Please sign in to comment.