Skip to content

Commit

Permalink
Merge pull request #25 from keephq/feat/add-env-from-secret
Browse files Browse the repository at this point in the history
feat: add extraInitContainers and env from secrets
  • Loading branch information
shahargl authored Aug 19, 2024
2 parents bfa9f4d + 699b1cd commit 2522268
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/keep/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: keep
version: 0.0.7
version: 0.1.0
description: Keep Helm Chart
type: application
icon: https://platform.keephq.dev/_next/image?url=%2Fkeep.png&w=48&q=75
Expand Down
35 changes: 35 additions & 0 deletions charts/keep/templates/keep-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,23 @@ spec:
env:
{{- range .Values.backend.env }}
- name: {{ .name }}
{{- if .secretKeyRef }}
valueFrom:
secretKeyRef:
name: {{ .secretName }}
key: {{ .secretKey }}
{{- else if .configMapKeyRef }}
valueFrom:
configMapKeyRef:
name: {{ .configMapName }}
key: {{ .configMapKey }}
{{- else if .fieldRef }}
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- else }}
value: {{ .value | quote }}
{{- end }}
{{- end }}
{{- if .Values.backend.openAiApi.enabled }}
- name: OPENAI_API_KEY
Expand Down Expand Up @@ -80,6 +96,25 @@ spec:
image: busybox
command: ['sh', '-c', 'until nc -z keep-database 3306; do sleep 1; done;']
{{- end }}
{{- range .Values.backend.extraInitContainers }}
- name: {{ .name }}
image: {{ .image }}
{{- with .imagePullPolicy }}
imagePullPolicy: {{ . }}
{{- end }}
{{- with .command }}
command: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .args }}
args: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .env }}
env: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .volumeMounts }}
volumeMounts: {{ toYaml . | nindent 12 }}
{{- end }}
{{- end }}

{{- with .Values.backend.nodeSelector }}
nodeSelector:
Expand Down
1 change: 1 addition & 0 deletions charts/keep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ backend:
repository: us-central1-docker.pkg.dev/keephq/keep/keep-api
pullPolicy: Always
tag: "latest"
extraInitContainers: []
imagePullSecrets: []
podAnnotations: {}
podSecurityContext: {}
Expand Down

0 comments on commit 2522268

Please sign in to comment.