Skip to content

Commit 2e21ed8

Browse files
committed
Allow users to configure labels
1 parent 616ef12 commit 2e21ed8

File tree

5 files changed

+31
-0
lines changed

5 files changed

+31
-0
lines changed

deploy/charts/bitwarden-sdk-server/templates/_helpers.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ helm.sh/chart: {{ include "bitwarden-sdk-server.chart" . }}
5151
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
5252
{{- end }}
5353
app.kubernetes.io/managed-by: {{ .Release.Service }}
54+
{{- if .Values.commonLabels }}
55+
{{ toYaml .Values.commonLabels }}
56+
{{- end }}
5457
{{- end }}
5558

5659
{{/*

deploy/charts/bitwarden-sdk-server/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ metadata:
99
{{- end }}
1010
labels:
1111
{{- include "bitwarden-sdk-server.labels" . | nindent 4 }}
12+
{{- with .Values.deploymentLabels }}
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
1215
spec:
1316
replicas: {{ .Values.replicaCount }}
1417
selector:
@@ -22,6 +25,9 @@ spec:
2225
{{- end }}
2326
labels:
2427
{{- include "bitwarden-sdk-server.selectorLabels" . | nindent 8 }}
28+
{{- with .Values.podLabels }}
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
2531
spec:
2632
{{- with .Values.imagePullSecrets }}
2733
imagePullSecrets:

deploy/charts/bitwarden-sdk-server/templates/service.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ metadata:
55
namespace: {{ template "bitwarden-sdk-server.namespace" . }}
66
labels:
77
{{- include "bitwarden-sdk-server.labels" . | nindent 4 }}
8+
{{- with .Values.service.labels }}
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
11+
{{- with .Values.service.annotations }}
12+
annotations:
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
815
spec:
916
type: {{ .Values.service.type }}
1017
ports:

deploy/charts/bitwarden-sdk-server/templates/serviceaccount.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ metadata:
66
namespace: {{ template "bitwarden-sdk-server.namespace" . }}
77
labels:
88
{{- include "bitwarden-sdk-server.labels" . | nindent 4 }}
9+
{{- with .Values.serviceAccount.labels }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
912
{{- with .Values.serviceAccount.annotations }}
1013
annotations:
1114
{{- toYaml . | nindent 4 }}

deploy/charts/bitwarden-sdk-server/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ extraEnv: {}
2828
# - name: HTTP_PROXY
2929
# value: "http://example.com:8080/"
3030

31+
# Additional labels to add to all chart resources
32+
commonLabels: {}
33+
3134
serviceAccount:
3235
# Specifies whether a service account should be created
3336
create: true
37+
# Labels to add to the service account
38+
labels: {}
3439
# Annotations to add to the service account
3540
annotations: {}
3641
# The name of the service account to use.
@@ -50,6 +55,9 @@ podDnsConfig: {}
5055
# value: "2"
5156
# - name: edns0
5257

58+
podLabels: {}
59+
deploymentLabels: {}
60+
5361
podAnnotations: {}
5462
deploymentAnnotations: {}
5563

@@ -67,6 +75,10 @@ securityContext: {}
6775
service:
6876
type: ClusterIP
6977
port: 9998
78+
# Labels to add to the service
79+
labels: {}
80+
# Annotations to add to the service
81+
annotations: {}
7082

7183
ingress:
7284
enabled: false

0 commit comments

Comments
 (0)