J release changes
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / secret-sa-token.yaml
1 {{- /* Due to GKE versions (e.g. v1.23.15-gke.1900) we need to handle pre-release part of the version as well.
2 See the related documentation of semver module that Helm depends on for semverCompare:
3 https://github.com/Masterminds/semver#working-with-prerelease-versions
4 Related Helm issue: https://github.com/helm/helm/issues/3810 */}}
5 {{- if and (or .Values.deployment.serviceAccount.create .Values.deployment.serviceAccount.name) (semverCompare "<1.20.0-0" .Capabilities.KubeVersion.Version) }}
6 apiVersion: v1
7 kind: Secret
8 metadata:
9   name: {{ template "kong.serviceAccountTokenName" . }} 
10   namespace: {{ template "kong.namespace" . }}
11   annotations:
12     kubernetes.io/service-account.name: {{ template "kong.serviceAccountName" . }}
13 type: kubernetes.io/service-account-token
14 {{- end }}