Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
add support to specify ServiceAccount. just use the supplied name
Browse files Browse the repository at this point in the history
  • Loading branch information
avl-allen-williams committed Apr 30, 2020
1 parent ee52acf commit 2c7242d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion charts/dgraph/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: dgraph
version: 0.0.8
version: 0.0.9
appVersion: v1.2.2
description: Dgraph is a horizontally scalable and distributed graph database, providing ACID transactions, consistent replication and linearizable reads.
keywords:
Expand Down
23 changes: 0 additions & 23 deletions charts/dgraph/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -167,26 +167,3 @@ initContainers:
{{- end }}

{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "dgraph.zero.serviceAccountName" -}}
{{- if .Values.zero.serviceAccount.create -}}
{{ default (include "dgraph.zero.fullname" .) .Values.zero.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.zero.serviceAccount.name }}
{{- end -}}
{{- end -}}


{{/*
Create the name of the service account to use
*/}}
{{- define "dgraph.alpha.serviceAccountName" -}}
{{- if .Values.alpha.serviceAccount.create -}}
{{ default (include "dgraph.alpha.fullname" .) .Values.alpha.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.alpha.serviceAccount.name }}
{{- end -}}
{{- end -}}
4 changes: 2 additions & 2 deletions charts/dgraph/templates/alpha-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ spec:
fsGroup: {{ .Values.alpha.securityContext.fsGroup }}
runAsUser: {{ .Values.alpha.securityContext.runAsUser }}
{{- end }}
{{- if .Values.alpha.serviceAccount.create }}
serviceAccountName: {{ include "dgraph.alpha.serviceAccountName" . }}
{{- if .Values.alpha.serviceAccount.name }}
serviceAccountName: {{ .Values.alpha.serviceAccount.name }}
{{- end }}
{{- if .Values.alpha.nodeSelector }}
nodeSelector:
Expand Down
4 changes: 2 additions & 2 deletions charts/dgraph/templates/zero-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ spec:
runAsUser: {{ .Values.zero.securityContext.runAsUser }}
{{- end }}

{{- if .Values.zero.serviceAccount.create }}
serviceAccountName: {{ include "dgraph.zero.serviceAccountName" . }}
{{- if .Values.zero.serviceAccount.name }}
serviceAccountName: {{ .Values.zero.serviceAccount.name }}
{{- end }}

{{- if .Values.zero.nodeSelector }}
Expand Down

0 comments on commit 2c7242d

Please sign in to comment.