Skip to content

Commit

Permalink
Yeti Tasks environment variables fix (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
wajihyassine authored Apr 16, 2024
1 parent 9780a92 commit 51ce767
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion charts/yeti/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: yeti
version: 1.0.1
version: 1.0.2
description: A Helm chart for Yeti Kubernetes deployments.
keywords:
- yeti
Expand Down
26 changes: 26 additions & 0 deletions charts/yeti/templates/_env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,30 @@ Worker pod upon startup.
value: "True"
- name: YETI_SYSTEM_PLUGINS_PATH
value: "./plugins"
- name: YETI_USER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-user
- name: YETI_ARANGODB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-arangodb
- name: YETI_API_KEY
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-api
{{- if .Values.global.timesketch.enabled }}
- name: YETI_TIMESKETCH_ENDPOINT
value: {{ printf "http://%s-timesketch:%.0f" .Release.Name .Values.global.timesketch.servicePort | quote }}
- name: YETI_TIMESKETCH_USERNAME
value: timesketch
- name: YETI_TIMESKETCH_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-timesketch-secret" .Release.Name | quote }}
key: timesketch-user
{{- end }}
{{- end }}
26 changes: 0 additions & 26 deletions charts/yeti/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,6 @@ spec:
command: ["sh", "-c", "poetry run python yetictl/cli.py create-user yeti $YETI_USER_PASSWORD --api_key $YETI_API_KEY --admin"]
env:
{{- include "yeti.envs" . | nindent 12 }}
- name: YETI_USER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-user
- name: YETI_ARANGODB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-arangodb
- name: YETI_API_KEY
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-api
{{- if .Values.global.timesketch.enabled }}
- name: YETI_TIMESKETCH_ENDPOINT
value: {{ printf "http://%s-timesketch:%.0f" .Release.Name .Values.global.timesketch.servicePort | quote }}
- name: YETI_TIMESKETCH_USERNAME
value: timesketch
- name: YETI_TIMESKETCH_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-timesketch-secret" .Release.Name | quote }}
key: timesketch-user
{{- end }}
volumeMounts:
- mountPath: /mnt/yeti
name: yetivolume
Expand Down
5 changes: 0 additions & 5 deletions charts/yeti/templates/tasks-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ spec:
command: ["sh", "-c", "/docker-entrypoint.sh tasks"]
env:
{{- include "yeti.envs" . | nindent 12 }}
- name: YETI_ARANGODB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "yeti.fullname" . }}-secret
key: yeti-arangodb
volumeMounts:
- mountPath: /mnt/yeti
name: yetivolume
Expand Down

0 comments on commit 51ce767

Please sign in to comment.