{{ if .Values.promtailSidecar.enabled -}}
apiVersion: v1
kind: Secret
metadata:
  name:  {{ .Release.Name }}-promtail-secret
  labels:
    app.kubernetes.io/component: gerrit-replica
    app.kubernetes.io/instance: {{ .Release.Name }}
    chart: {{ template "gerrit-replica.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
    {{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels  | indent 4 }}
    {{- end }}
type: Opaque
data:
  promtail.secret: {{ .Values.promtailSidecar.loki.password | b64enc }}
{{- end }}
