Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add extraInitContainers and env from secrets #25

Merged
merged 4 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
repository: us-central1-docker.pkg.dev/keephq/keep/keep-api
pullPolicy: Always
tag: "latest"
extraInitContainers: []
imagePullSecrets: []
podAnnotations: {}
podSecurityContext: {}
Expand Down Expand Up @@ -235,7 +236,7 @@
tag: "latest"
env:
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: yes

Check warning on line 239 in charts/keep/values.yaml

View workflow job for this annotation

GitHub Actions / lint-chart

239:14 [truthy] truthy value should be one of [false, true]
- name: MYSQL_DATABASE
value: keep
- name: MYSQL_PASSWORD
Expand Down
Loading