diff --git a/charts/lagoon-core/templates/api.deployment.yaml b/charts/lagoon-core/templates/api.deployment.yaml index 9e80c224..d8a82e4c 100644 --- a/charts/lagoon-core/templates/api.deployment.yaml +++ b/charts/lagoon-core/templates/api.deployment.yaml @@ -31,46 +31,46 @@ spec: securityContext: {{- toYaml (coalesce .Values.api.podSecurityContext .Values.podSecurityContext) | nindent 8 }} initContainers: - - command: - - "sh" - - "-c" - - "node -r dotenv-extended/config dist/migrations/lagoon/migration.js" - image: "{{ .Values.api.image.repository }}:{{ coalesce .Values.api.image.tag .Values.imageTag .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.api.image.pullPolicy }} - name: migrations - env: - - name: API_DB_HOST - value: {{ include "lagoon-core.apiDB.fullname" . }} - - name: API_DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "lagoon-core.apiDB.fullname" . }} - key: API_DB_PASSWORD - - name: KEYCLOAK_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ include "lagoon-core.keycloak.fullname" . }} - key: KEYCLOAK_ADMIN_PASSWORD - - name: KEYCLOAK_ADMIN_USER - value: {{ .Values.keycloakAdminUser | quote }} - - name: KEYCLOAK_API_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: {{ include "lagoon-core.keycloak.fullname" . }} - key: KEYCLOAK_API_CLIENT_SECRET - - name: KEYCLOAK_URL - {{- if .Values.keycloakFrontEndURL }} - value: {{ .Values.keycloakFrontEndURL }} - {{- else if .Values.keycloak.ingress.enabled }} - value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }} - {{- else }} - value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }} - {{- end }} - - name: REDIS_HOST - value: {{ include "lagoon-core.apiRedis.fullname" . }} - envFrom: - - secretRef: - name: {{ include "lagoon-core.api.fullname" . }} + - command: + - "sh" + - "-c" + - "node -r dotenv-extended/config dist/migrations/lagoon/migration.js" + image: "{{ .Values.api.image.repository }}:{{ coalesce .Values.api.image.tag .Values.imageTag .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.api.image.pullPolicy }} + name: migrations + env: + - name: API_DB_HOST + value: {{ include "lagoon-core.apiDB.fullname" . }} + - name: API_DB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "lagoon-core.apiDB.fullname" . }} + key: API_DB_PASSWORD + - name: KEYCLOAK_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "lagoon-core.keycloak.fullname" . }} + key: KEYCLOAK_ADMIN_PASSWORD + - name: KEYCLOAK_ADMIN_USER + value: {{ .Values.keycloakAdminUser | quote }} + - name: KEYCLOAK_API_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: {{ include "lagoon-core.keycloak.fullname" . }} + key: KEYCLOAK_API_CLIENT_SECRET + - name: KEYCLOAK_URL + {{- if .Values.keycloakFrontEndURL }} + value: {{ .Values.keycloakFrontEndURL }} + {{- else if .Values.keycloak.ingress.enabled }} + value: https://{{ index .Values.keycloak.ingress.hosts 0 "host" }} + {{- else }} + value: http://{{ include "lagoon-core.keycloak.fullname" . }}:{{ .Values.keycloak.service.port }} + {{- end }} + - name: REDIS_HOST + value: {{ include "lagoon-core.apiRedis.fullname" . }} + envFrom: + - secretRef: + name: {{ include "lagoon-core.api.fullname" . }} containers: - name: api securityContext: