apiVersion: v1
kind: Secret
metadata:
  name: {{ template "rethinkdb.fullname" . }}
  labels:
    app: {{ template "rethinkdb.name" . }}
    chart: {{ template "rethinkdb.chart" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  rethinkdb-password: {{ .Values.rethinkdbPassword | b64enc | quote }}
  {{- if .Values.proxy.driverTLS.enabled }}
  driver-key.pem: {{ .Values.proxy.driverTLS.key | b64enc | quote }}
  driver-cert.pem: {{ .Values.proxy.driverTLS.cert | b64enc| quote }}
  {{- end }}
