Skip to content

Commit

Permalink
chore(generated-service): make init-container optional is DB_URL isnt…
Browse files Browse the repository at this point in the history
… specified
  • Loading branch information
levivannoort committed Sep 11, 2023
1 parent 4595e46 commit 24addf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion generated-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: generated-service
description: A Helm chart for the generated-service component of Amplication

type: application
version: 2.0.1
version: 2.0.2
appVersion: "0.0.0"

sources:
Expand Down
2 changes: 2 additions & 0 deletions generated-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ spec:
serviceAccountName: {{ include "generated-service.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if or .Values.variables.externalSecret.DB_URL .Values.variables.secret.DB_URL }}
initContainers:
- name: {{ .Chart.Name }}-migrate
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand All @@ -45,6 +46,7 @@ spec:
name: {{ include "generated-service.fullname" . }}-variables
key: DB_URL
optional: false
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down

0 comments on commit 24addf2

Please sign in to comment.