-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat(charts/authentik): Support Service accounts for authentik #321
base: main
Are you sure you want to change the base?
Conversation
This will allow the use of container secret intrfaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already support setting a custom service account. As such I'm not inclined to accept this PR.
{{- if .Values.server.serviceAccount.create }} | ||
{{- if .Values.server.serviceAccount.name }} | ||
serviceAccountName: {{ .Values.server.serviceAccount.name }} | ||
{{- else }} | ||
serviceAccountName: {{ template "authentik.server.fullname" . }} | ||
{{- end }} | ||
{{- else }} | ||
{{- with .Values.server.imagePullSecrets | default .Values.global.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .Values.server.serviceAccountName }} | ||
serviceAccountName: {{ . }} | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might result in multiple serviceAccountName
being set. Also, it removes imagePullSecrets
when no service account is set
{{- if .Values.worker.serviceAccount.create }} | ||
{{- if .Values.worker.serviceAccount.name }} | ||
serviceAccountName: {{ .Values.worker.serviceAccount.name }} | ||
{{- else }} | ||
serviceAccountName: {{ template "authentik.server.fullname" . }} | ||
{{- end }} | ||
{{- else }} | ||
{{- with .Values.worker.imagePullSecrets | default .Values.global.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.worker.serviceAccountName }} | ||
{{- end }} | ||
{{- with .Values.server.serviceAccountName }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the server. Also this references server.serviceAccountName although we're templating the worker deployment here
serviceAccountName: ~ | ||
|
||
serviceAccount: | ||
create: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely shouldn't be true by default, especially since we're using authentik-remote-cluster by default.
This will allow the use of container secret intrfaces