diff --git a/packages/apps/nats/templates/nats.yaml b/packages/apps/nats/templates/nats.yaml index 55e0bd85..b5cfd6e4 100644 --- a/packages/apps/nats/templates/nats.yaml +++ b/packages/apps/nats/templates/nats.yaml @@ -52,9 +52,9 @@ spec: resources: {{- include "cozy-lib.resources.defaultingSanitize" (list .Values.resourcesPreset .Values.resources $) | nindent 12 }} fullnameOverride: {{ .Release.Name }} config: - {{- if or (gt (len $passwords) 0) (gt (len .Values.config.merge) 0) }} + {{- if or $passwords .Values.config.merge }} merge: - {{- if gt (len $passwords) 0 }} + {{- if $passwords }} accounts: A: users: @@ -63,13 +63,13 @@ spec: password: "{{ $password }}" {{- end }} {{- end }} - {{- if and .Values.config (hasKey .Values.config "merge") }} - {{ toYaml .Values.config.merge | nindent 12 }} + {{- with .Values.config.merge }} + {{- toYaml . | nindent 10 }} {{- end }} {{- end }} - {{- if and .Values.config (hasKey .Values.config "resolver") }} + {{- with .Values.config.resolver }} resolver: - {{ toYaml .Values.config.resolver | nindent 12 }} + {{- toYaml . | nindent 10 }} {{- end }} cluster: enabled: true