From 02601ca26735178010a4a11a71dac0d9d4dd573c Mon Sep 17 00:00:00 2001 From: WrenIX Date: Wed, 13 Mar 2024 19:25:45 +0100 Subject: [PATCH] fix(authentik): add option to set serviceaccount --- charts/authentik/Chart.yaml | 2 +- charts/authentik/templates/server/deployment.yaml | 3 +++ charts/authentik/templates/worker/deployment.yaml | 4 ++++ charts/authentik/values.yaml | 6 ++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/charts/authentik/Chart.yaml b/charts/authentik/Chart.yaml index 5879bc0..19ff25b 100644 --- a/charts/authentik/Chart.yaml +++ b/charts/authentik/Chart.yaml @@ -1,6 +1,6 @@ --- apiVersion: v2 -version: 2024.2.2 +version: 2024.2.3 appVersion: 2024.2.2 name: authentik description: authentik is an open-source Identity Provider focused on flexibility and versatility diff --git a/charts/authentik/templates/server/deployment.yaml b/charts/authentik/templates/server/deployment.yaml index daf45b6..dcc50c6 100644 --- a/charts/authentik/templates/server/deployment.yaml +++ b/charts/authentik/templates/server/deployment.yaml @@ -42,6 +42,9 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.server.serviceAccount }} + serviceAccountName: {{ . }} + {{- end }} {{- with .Values.global.hostAliases }} hostAliases: {{- toYaml . | nindent 8 }} diff --git a/charts/authentik/templates/worker/deployment.yaml b/charts/authentik/templates/worker/deployment.yaml index 9625b71..81dc905 100644 --- a/charts/authentik/templates/worker/deployment.yaml +++ b/charts/authentik/templates/worker/deployment.yaml @@ -44,6 +44,10 @@ spec: {{- end }} {{- if .Values.serviceAccount.create }} serviceAccountName: {{ include "authentik-remote-cluster.fullname" .Subcharts.serviceAccount }} + {{- else }} + {{- with .Values.server.serviceAccount }} + serviceAccountName: {{ . }} + {{- end }} {{- end }} {{- with .Values.global.hostAliases }} hostAliases: diff --git a/charts/authentik/values.yaml b/charts/authentik/values.yaml index 05c96a7..2fd3f0a 100644 --- a/charts/authentik/values.yaml +++ b/charts/authentik/values.yaml @@ -370,6 +370,9 @@ server: # -- Alternative DNS policy for authentik server pods dnsPolicy: "" + # -- serviceAccount for usage of server pods + serviceAccount: + # -- authentik server pod-level security context # @default -- `{}` (See [values.yaml]) securityContext: {} @@ -746,6 +749,9 @@ worker: # -- Alternative DNS policy for authentik worker pods dnsPolicy: "" + # -- serviceAccount for usage of worker pods + serviceAccount: + # -- authentik worker pod-level security context # @default -- `{}` (See [values.yaml]) securityContext: {}