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

Feature extra env init container #2602

Closed
Show file tree
Hide file tree
Changes from 2 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
25 changes: 25 additions & 0 deletions backend/charts/api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,31 @@ spec:
- migrate
- up

{{- with .Values.migrations.extraEnvVars }}
nickzelei marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running this but the helm output failed due to indentation I believe. I think it might need to be indented one more section so that it appears underneath the env.

{{- range .}}
- name: {{ .name }}
{{- if .value }}
value: {{ .value | quote }}
{{- else if .valueFrom }}
valueFrom:
{{- if .valueFrom.secretKeyRef }}
secretKeyRef:
name: {{ .valueFrom.secretKeyRef.name }}
key: {{ .valueFrom.secretKeyRef.key }}
{{- end }}
{{- if .valueFrom.configMapKeyRef }}
configMapKeyRef:
name: {{ .valueFrom.configMapKeyRef.name }}
key: {{ .valueFrom.configMapKeyRef.key }}
{{- end }}
{{- if .valueFrom.fieldRef }}
fieldRef:
fieldPath: {{ .valueFrom.fieldRef.fieldPath }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

envFrom:
- secretRef:
name: {{ template "neosync-api.fullname" . }}-migration-evs
Expand Down
2 changes: 2 additions & 0 deletions backend/charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ migrations:
migrationsTableQuoted: false
# -- Extra database options that will be appended to the query string
options:
# -- Provide extra environment variables that will be applied to the deployment.
extraEnvVars: []

# Set requests and limits on the backend to change its performance
resources:
Expand Down