Skip to content

Commit aa74b51

Browse files
authored
fix(adder): make ServiceAccount name match release name (#277)
Signed-off-by: Aurora Gaffney <aurora@blinklabs.io>
1 parent 7e346ba commit aa74b51

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

charts/adder/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: adder
33
description: "A Helm chart for deploying Adder"
4-
version: 0.1.0
4+
version: 0.1.1
55
appVersion: 0.33.0
66

77
sources:

charts/adder/templates/_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ app.kubernetes.io/instance: {{ .Release.Name }}
1717
app.kubernetes.io/version: {{ .Chart.AppVersion }}
1818
app.kubernetes.io/managed-by: {{ .Release.Service }}
1919
{{- end }}
20+
21+
{{- define "adder.serviceAccountName" -}}
22+
{{ .Values.serviceAccount.name | default (printf "%s-sa" .Release.Name) }}
23+
{{- end -}}

charts/adder/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
{{- toYaml .Values.podAnnotations | nindent 8 }}
2525
{{- end }}
2626
spec:
27-
serviceAccountName: {{ .Values.serviceAccount.name }}
27+
serviceAccountName: {{ include "adder.serviceAccountName" . }}
2828
containers:
2929
- name: adder
3030
command: ["adder", "-config", "/adder/config.yaml"]

charts/adder/templates/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: {{ .Values.serviceAccount.name }}
5+
name: {{ include "adder.serviceAccountName" . }}
66
{{- if .Values.serviceAccount.annotations }}
77
annotations: {{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
88
{{- end }}

charts/adder/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ service:
2626
api: 8080
2727

2828
serviceAccount:
29-
name: adder-sa
29+
# name: adder-sa
3030
annotations: {}
3131

3232
config: |

0 commit comments

Comments
 (0)