Spaces:
Paused
Paused
feat(chart): service account (#1252)
Browse files- chart/env/prod.yaml +6 -1
- chart/templates/deployment.yaml +3 -0
- chart/templates/service-account.yaml +13 -0
- chart/values.yaml +7 -0
chart/env/prod.yaml
CHANGED
|
@@ -8,7 +8,12 @@ nodeSelector:
|
|
| 8 |
tolerations:
|
| 9 |
- key: CriticalAddonsOnly
|
| 10 |
operator: Equal
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
ingress:
|
| 13 |
path: "/chat"
|
| 14 |
annotations:
|
|
|
|
| 8 |
tolerations:
|
| 9 |
- key: CriticalAddonsOnly
|
| 10 |
operator: Equal
|
| 11 |
+
|
| 12 |
+
serviceAccount:
|
| 13 |
+
enabled: true
|
| 14 |
+
create: true
|
| 15 |
+
name: huggingchat-prod
|
| 16 |
+
|
| 17 |
ingress:
|
| 18 |
path: "/chat"
|
| 19 |
annotations:
|
chart/templates/deployment.yaml
CHANGED
|
@@ -25,6 +25,9 @@ spec:
|
|
| 25 |
co.elastic.logs/json.expand_keys: "true"
|
| 26 |
{{- end }}
|
| 27 |
spec:
|
|
|
|
|
|
|
|
|
|
| 28 |
containers:
|
| 29 |
- name: chat-ui
|
| 30 |
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
|
|
|
|
| 25 |
co.elastic.logs/json.expand_keys: "true"
|
| 26 |
{{- end }}
|
| 27 |
spec:
|
| 28 |
+
{{- if .Values.serviceAccount.enabled }}
|
| 29 |
+
serviceAccountName: "{{ .Values.serviceAccount.name | default (include "name" .) }}"
|
| 30 |
+
{{- end }}
|
| 31 |
containers:
|
| 32 |
- name: chat-ui
|
| 33 |
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}"
|
chart/templates/service-account.yaml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{- if and .Values.serviceAccount.enabled .Values.serviceAccount.create }}
|
| 2 |
+
apiVersion: v1
|
| 3 |
+
kind: ServiceAccount
|
| 4 |
+
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
| 5 |
+
metadata:
|
| 6 |
+
name: "{{ .Values.serviceAccount.name | default (include "name" .) }}"
|
| 7 |
+
namespace: {{ .Release.Namespace }}
|
| 8 |
+
labels: {{ include "labels.standard" . | nindent 4 }}
|
| 9 |
+
{{- with .Values.serviceAccount.annotations }}
|
| 10 |
+
annotations:
|
| 11 |
+
{{- toYaml . | nindent 4 }}
|
| 12 |
+
{{- end }}
|
| 13 |
+
{{- end }}
|
chart/values.yaml
CHANGED
|
@@ -12,6 +12,13 @@ service:
|
|
| 12 |
type: NodePort
|
| 13 |
annotations: { }
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
ingress:
|
| 16 |
enabled: true
|
| 17 |
path: "/"
|
|
|
|
| 12 |
type: NodePort
|
| 13 |
annotations: { }
|
| 14 |
|
| 15 |
+
serviceAccount:
|
| 16 |
+
enabled: false
|
| 17 |
+
create: false
|
| 18 |
+
name: ""
|
| 19 |
+
automountServiceAccountToken: true
|
| 20 |
+
annotations: { }
|
| 21 |
+
|
| 22 |
ingress:
|
| 23 |
enabled: true
|
| 24 |
path: "/"
|