Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authentik: add option to set serviceaccount #253

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/authentik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ The secret `authentik-postgres-credentials` must have `username` and `password`
| server.service.sessionAffinity | string | `""` | Used to maintain session affinity. Supports `ClientIP` and `None` |
| server.service.sessionAffinityConfig | object | `{}` | Session affinity configuration |
| server.service.type | string | `"ClusterIP"` | authentik server service type |
| server.serviceAccountName | string | `nil` | serviceAccount to use for authentik server pods |
| server.startupProbe.failureThreshold | int | `60` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded |
| server.startupProbe.httpGet.path | string | `"/-/health/live/"` | |
| server.startupProbe.httpGet.port | string | `"http"` | |
Expand Down Expand Up @@ -348,6 +349,7 @@ The secret `authentik-postgres-credentials` must have `username` and `password`
| worker.replicas | int | `1` | The number of worker pods to run |
| worker.resources | object | `{}` | Resource limits and requests for the authentik worker |
| worker.securityContext | object | `{}` (See [values.yaml]) | authentik worker pod-level security context |
| worker.serviceAccountName | string | `nil` | serviceAccount to use for authentik worker pods. If set, overrides the value used when serviceAccount.create is true |
| worker.startupProbe.exec.command[0] | string | `"ak"` | |
| worker.startupProbe.exec.command[1] | string | `"healthcheck"` | |
| worker.startupProbe.failureThreshold | int | `60` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded |
Expand Down
3 changes: 3 additions & 0 deletions charts/authentik/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.server.serviceAccountName }}
serviceAccountName: {{ . }}
{{- end }}
{{- with .Values.global.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/authentik/templates/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.serviceAccountName }}
serviceAccountName: {{ . }}
{{- else }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ include "authentik-remote-cluster.fullname" .Subcharts.serviceAccount }}
{{- end }}
{{- end }}
{{- with .Values.global.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/authentik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ server:
# -- Alternative DNS policy for authentik server pods
dnsPolicy: ""

# -- serviceAccount to use for authentik server pods
serviceAccountName: ~

# -- authentik server pod-level security context
# @default -- `{}` (See [values.yaml])
securityContext: {}
Expand Down Expand Up @@ -746,6 +749,9 @@ worker:
# -- Alternative DNS policy for authentik worker pods
dnsPolicy: ""

# -- serviceAccount to use for authentik worker pods. If set, overrides the value used when serviceAccount.create is true
serviceAccountName: ~

# -- authentik worker pod-level security context
# @default -- `{}` (See [values.yaml])
securityContext: {}
Expand Down
Loading