{{- if .Values.namespaces }} {{- range $ns := .Values.namespaces }} --- apiVersion: v1 kind: Namespace metadata: name: {{ $ns.name }} labels: {{- include "namespaces.labels" $ | nindent 4 }} {{- with $ns.labels }} {{- toYaml . | nindent 4 }} {{- end }} {{- with $ns.annotations}} annotations: {{- toYaml . | nindent 4 }} {{- end }} {{- end }} {{- end }}