Add globalnet service account creation

Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
This commit is contained in:
Mike Kolesnik
2020-01-22 16:50:32 +02:00
parent afac49e68e
commit 35417fa669
3 changed files with 28 additions and 2 deletions
+12 -1
View File
@@ -51,4 +51,15 @@ Create the name of the submariner-route-agent service account to use
{{- else -}}
{{ default "default" .Values.serviceAccounts.routeAgent.name }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create the name of the submariner-globalnet service account to use
*/}}
{{- define "submariner.globalnetServiceAccountName" -}}
{{- if .Values.serviceAccounts.globalnet.create -}}
{{ default (printf "%s-globalnet" (include "submariner.fullname" .)) .Values.serviceAccounts.globalnet.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.globalnet.name }}
{{- end -}}
{{- end -}}
+13 -1
View File
@@ -20,4 +20,16 @@ metadata:
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.name" . }}
{{- end }}
{{- end }}
---
{{- if .Values.serviceAccounts.globalnet.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "submariner.globalnetServiceAccountName" . }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.name" . }}
{{- end }}
+3
View File
@@ -56,3 +56,6 @@ serviceAccounts:
routeAgent:
create: true
name: ""
globalnet:
create: false
name: ""