serviceaccount.yaml 1.01 KB
Newer Older
Sandro Mathys's avatar
Sandro Mathys committed
1
{{- if .Values.serviceAccount.create }}
Sandro Mathys's avatar
Sandro Mathys committed
2
3
4
5
6
7
8
9
10
11
12
13
14
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "shibboleth-sp.serviceAccountName" . }}
  labels:
    {{- include "shibboleth-sp.labels" . | nindent 4 }}
  {{- with .Values.serviceAccount.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
automountServiceAccountToken: false
{{- end -}}
Sandro Mathys's avatar
Sandro Mathys committed
15
{{- if (and .Values.backend.shibboleth.sessionCache.enabled .Values.backend.shibboleth.sessionCache.sealerKeys.serviceAccount.create) }}
Sandro Mathys's avatar
Sandro Mathys committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "shibboleth-sp.sealerKeys.serviceAccountName" . }}
  labels:
    {{- include "shibboleth-sp.labels" . | nindent 4 }}
  annotations:
    "helm.sh/hook": pre-install
    "helm.sh/hook-weight": "0"
    {{- if .Values.backend.shibboleth.sessionCache.sealerKeys.serviceAccount.annotations }}
    {{- .Values.backend.shibboleth.sessionCache.sealerKeys.serviceAccount.annotations | toYaml | nindent 4 }}
    {{- end }}
automountServiceAccountToken: true
{{- end -}}