{{- if .Values.extraSecrets }}
{{- $ctx := dict "helm" . }}
{{- range .Values.extraSecrets }}
---
apiVersion: v1
kind: Secret
metadata:
  {{- with .annotations }}
  annotations: {{ toYaml . | nindent 4 }}
  {{- end }}
  {{- $_ := set $ctx "extraLabels" .labels }}
  labels: {{ include "vm.metaLabels" $ctx | nindent 4 }}
  {{- $_ := unset $ctx "extraLabels" }}
  name: {{ .name }}
  namespace: {{ include "vm.namespace" $ }}
type: Opaque
{{- with .data }}
data: {{- tpl . $ | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
