X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Finfrastructure%2Fsubcharts%2Fkong%2Ftemplates%2Fsecret-sa-token.yaml;fp=helm%2Finfrastructure%2Fsubcharts%2Fkong%2Ftemplates%2Fsecret-sa-token.yaml;h=fe8a67d23948b0c2afc7366fdf432bae25444e1f;hb=75c0de3cae4b58e001f7ec715f13f82ded10e678;hp=0000000000000000000000000000000000000000;hpb=7799f9c20d56ceaab38178b7083ed66e63312a0c;p=ric-plt%2Fric-dep.git diff --git a/helm/infrastructure/subcharts/kong/templates/secret-sa-token.yaml b/helm/infrastructure/subcharts/kong/templates/secret-sa-token.yaml new file mode 100644 index 0000000..fe8a67d --- /dev/null +++ b/helm/infrastructure/subcharts/kong/templates/secret-sa-token.yaml @@ -0,0 +1,14 @@ +{{- /* Due to GKE versions (e.g. v1.23.15-gke.1900) we need to handle pre-release part of the version as well. +See the related documentation of semver module that Helm depends on for semverCompare: +https://github.com/Masterminds/semver#working-with-prerelease-versions +Related Helm issue: https://github.com/helm/helm/issues/3810 */}} +{{- if and (or .Values.deployment.serviceAccount.create .Values.deployment.serviceAccount.name) (semverCompare "<1.20.0-0" .Capabilities.KubeVersion.Version) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "kong.serviceAccountTokenName" . }} + namespace: {{ template "kong.namespace" . }} + annotations: + kubernetes.io/service-account.name: {{ template "kong.serviceAccountName" . }} +type: kubernetes.io/service-account-token +{{- end }}