Allow service account to be set

This commit is contained in:
Alex Nederlof 2024-11-24 16:24:22 +01:00
parent 48ab03c9d6
commit afcd804aaf
No known key found for this signature in database
3 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name | default (include "open-webui.name" .) }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
labels:
{{- include "open-webui.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -54,7 +54,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
enableServiceLinks: false
automountServiceAccountToken: false
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "open-webui.name" .) }}
{{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}

View File

@ -43,6 +43,12 @@ image:
tag: ""
pullPolicy: "IfNotPresent"
serviceAccount:
create: true
name: ""
annotations: {}
automountServiceAccountToken: false
# -- Configure imagePullSecrets to use private registry
# ref: <https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry>
imagePullSecrets: []