Skip to content

Commit 4c561a2

Browse files
committed
Make serviceAccount disable able
1 parent a720989 commit 4c561a2

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

charts/logprep/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ spec:
2020
annotations:
2121
{{ toYaml .Values.podAnnotations| nindent 8 }}
2222
spec:
23+
{{- if .Values.serviceAccount.enabled }}
2324
serviceAccountName: {{ template "logprep.serviceAccountName" .}}
25+
{{- end }}
2426
{{- if .Values.podSecurityContext.enabled }}
2527
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
2628
{{- end }}

charts/logprep/templates/service-account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.serviceAccount.create }}
1+
{{- if and .Values.serviceAccount.create .Values.serviceAccount.enabled }}
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:

charts/logprep/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ resources:
1616
memory: "2Gi"
1717
cpu: "250m"
1818
serviceAccount:
19+
# if not enabled nothing happens
20+
enabled: false
1921
create: true
2022
# auto generates if left empty
2123
name: ""

0 commit comments

Comments
 (0)