J release changes
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / service-account.yaml
diff --git a/helm/infrastructure/subcharts/kong/templates/service-account.yaml b/helm/infrastructure/subcharts/kong/templates/service-account.yaml
new file mode 100644 (file)
index 0000000..41ef6ac
--- /dev/null
@@ -0,0 +1,15 @@
+{{- if and (or .Values.deployment.kong.enabled .Values.ingressController.enabled) .Values.deployment.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ template "kong.serviceAccountName" . }}
+  namespace: {{ template "kong.namespace" . }}
+  {{- if .Values.deployment.serviceAccount.annotations }}
+  annotations:
+  {{- range $key, $value := .Values.deployment.serviceAccount.annotations }}
+    {{ $key }}: {{ $value | quote }}
+  {{- end }}
+  {{- end }}
+  labels:
+    {{- include "kong.metaLabels" . | nindent 4 }}
+{{- end -}}