Skip to content

Commit d75c683

Browse files
committed
Fix env indents breaking yaml syntax
1 parent 77011ab commit d75c683

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

backend/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: backend
3-
version: 0.2.1
3+
version: 0.2.2
44
description: Backend of the Snoty application suite
55
type: application
66
home: https://snoty.me

backend/templates/_config.tpl

+29-29
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,33 @@
7676
{{- end }}
7777

7878
{{- define "snoty.envLoaders" -}}
79-
{{ if kindIs "map" .Values.mongodb.auth }}
80-
{{- with .Values.mongodb.auth }}
81-
{{ if .existingSecret }}
82-
- name: mongodb.authentication.password
83-
valueFrom:
84-
secretKeyRef:
85-
name: {{ .existingSecret }}
86-
key: {{ .secretKey | default "mongodb-passwords" }}
87-
{{- end -}}
88-
{{- end -}}
89-
{{- end -}}
90-
{{- with $.Values.appConfig }}
91-
{{- with .authentication -}}
92-
{{ if kindIs "map" .clientId }}
93-
- name: authentication.clientId
94-
valueFrom:
95-
secretKeyRef:
96-
name: {{ .clientId.secretName }}
97-
key: {{ .clientId.secretKey | default "clientId" }}
98-
{{- end -}}
99-
{{ if kindIs "map" .clientSecret }}
100-
- name: authentication.clientSecret
101-
valueFrom:
102-
secretKeyRef:
103-
name: {{ .clientSecret.secretName }}
104-
key: {{ .clientSecret.secretKey | default "clientSecret" }}
105-
{{- end -}}
106-
{{- end -}}
107-
{{- end -}}
79+
{{- if kindIs "map" .Values.mongodb.auth }}
80+
{{- with .Values.mongodb.auth -}}
81+
{{- if .existingSecret -}}
82+
- name: mongodb.authentication.password
83+
valueFrom:
84+
secretKeyRef:
85+
name: {{ .existingSecret }}
86+
key: {{ .secretKey | default "mongodb-passwords" }}
87+
{{- end -}}
88+
{{- end -}}
89+
{{- end -}}
90+
{{- with $.Values.appConfig -}}
91+
{{- with .authentication -}}
92+
{{- if kindIs "map" .clientId }}
93+
- name: authentication.clientId
94+
valueFrom:
95+
secretKeyRef:
96+
name: {{ .clientId.secretName }}
97+
key: {{ .clientId.secretKey | default "clientId" }}
98+
{{- end -}}
99+
{{- if kindIs "map" .clientSecret }}
100+
- name: authentication.clientSecret
101+
valueFrom:
102+
secretKeyRef:
103+
name: {{ .clientSecret.secretName }}
104+
key: {{ .clientSecret.secretKey | default "clientSecret" }}
105+
{{- end -}}
106+
{{- end -}}
107+
{{- end -}}
108108
{{- end -}}

backend/templates/deployment.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ spec:
3535
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" $) | nindent 12 }}
3636
{{- end }}
3737
env:
38-
{{- $envLoaders := include "snoty.envLoaders" . | nindent 8 | trim }}
39-
{{- if $envLoaders }}
40-
{{ $envLoaders }}
41-
{{- end }}
38+
{{ $envLoaders := include "snoty.envLoaders" . }}
39+
{{- if $envLoaders -}}
40+
{{- $envLoaders | nindent 10 | trim -}}
41+
{{- end -}}
4242
{{- if .Values.extraEnvVars }}
4343
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 10 }}
4444
{{- end }}

0 commit comments

Comments
 (0)