Skip to content

Commit

Permalink
Merge pull request #110 from alexnederlof/allow-service-accounts
Browse files Browse the repository at this point in the history
Allow service accounts
  • Loading branch information
0xThresh authored Nov 24, 2024
2 parents 2b83759 + 746fe34 commit cf12b1d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/open-webui/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: open-webui
version: 4.0.1
version: 4.0.2
appVersion: 0.4.2
home: https://www.openwebui.com/
icon: >-
Expand Down
14 changes: 14 additions & 0 deletions charts/open-webui/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.enable }}
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 }}
7 changes: 5 additions & 2 deletions charts/open-webui/templates/workload-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
{{- end }}
command: ['sh', '-c', 'cp -R -n /app/backend/data/* /tmp/app-data/']
{{- with .Values.containerSecurityContext }}
{{- with .Values.copy-app-data.resources }}
{{- with .Values.copyAppData.resources }}
resources: {{- toYaml . | nindent 10 }}
{{- end }}
securityContext:
Expand All @@ -57,7 +57,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
enableServiceLinks: false
automountServiceAccountToken: false
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- if .Values.serviceAccount.enable }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "open-webui.name" .) }}
{{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/open-webui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ image:
tag: ""
pullPolicy: "IfNotPresent"

serviceAccount:
enable: 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: []
Expand Down

0 comments on commit cf12b1d

Please sign in to comment.