Skip to content

Commit

Permalink
Merge pull request #118 from alexnederlof/allow-pipieline-sa
Browse files Browse the repository at this point in the history
Enable service accounts for pipelines chart
  • Loading branch information
0xThresh authored Dec 2, 2024
2 parents 357d167 + f539153 commit 3ac14d7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
6 changes: 5 additions & 1 deletion charts/pipelines/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
enableServiceLinks: false
automountServiceAccountToken: false
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken | default false }}
{{- if .Values.serviceAccount.enable }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "pipelines.name" .) }}
{{- end }}

containers:
- name: {{ .Chart.Name }}
{{- with .Values.image }}
Expand Down
12 changes: 12 additions & 0 deletions charts/pipelines/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.enable }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name | default (include "pipelines.name" .) }}
labels:
{{- include "pipelines.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/pipelines/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ persistence:
selector: {}
annotations: {}

serviceAccount:
enable: true
automountServiceAccountToken: false

# -- Node labels for pod assignment.
nodeSelector: {}

Expand Down

0 comments on commit 3ac14d7

Please sign in to comment.