{{ if .Values.caCert -}}
apiVersion: v1
kind: Secret
metadata:
  name:  {{ .Release.Name }}-tls-ca
  labels:
    app.kubernetes.io/component: gerrit
    app.kubernetes.io/instance: {{ .Release.Name }}
    chart: {{ template "gerrit.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
    {{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels  | indent 4 }}
    {{- end }}
data:
  ca.crt: {{ .Values.caCert | b64enc }}
type: Opaque
{{- end }}
