fix(helm): resolve YAML structure issue in env vars
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
Problem: Mixing toYaml output with inline list items broke YAML structure
{{- toYaml .Values.env | nindent 12 }}
- name: API_URL # This caused parse error
Solution: Define all env vars inline and append .Values.env at the end
using range loop. This creates valid YAML list structure.
Now helm lint and helm template both pass successfully.
This commit is contained in:
@@ -48,7 +48,6 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
env:
|
env:
|
||||||
{{- toYaml .Values.env | nindent 12 }}
|
|
||||||
- name: API_URL
|
- name: API_URL
|
||||||
value: {{ .Values.reflex.apiUrl | quote }}
|
value: {{ .Values.reflex.apiUrl | quote }}
|
||||||
- name: FRONTEND_PORT
|
- name: FRONTEND_PORT
|
||||||
@@ -93,6 +92,10 @@ spec:
|
|||||||
value: "redis://$(REDIS_HOST):$(REDIS_PORT)/0"
|
value: "redis://$(REDIS_HOST):$(REDIS_PORT)/0"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- range .Values.env }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ include "peikarband.fullname" . }}
|
name: {{ include "peikarband.fullname" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user