apiVersion: v1
kind: Secret
metadata:
  name: {{ template "magic-ip-address.fullname" . }}
  labels:
    app: {{ template "magic-ip-address.name" . }}
    chart: {{ template "magic-ip-address.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  PORT: {{ printf "%d" .Values.config.port | b64enc }}
  SELECTOR: {{ .Values.config.selector | b64enc }}
  PROTOCOL: {{ .Values.config.protocol | b64enc }}
  MAGIC_IP: {{ .Values.config.ipAddress | b64enc }}
  HOST_INTERFACE: {{ .Values.config.hostInterface | b64enc }}
  verbose: {{ printf "%v" .Values.config.verbose | b64enc }}
{{- range $key, $value := .Values.extraVars }}
  {{ $key }}: {{ $value | quote }}
{{- end }}
