{{- if .Values.rabbitmq.auth.tls.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: rabbitmq-server-certificate
  namespace: {{ .Release.Namespace }}
  labels:
{{ include "kubezero-lib.labels" . | indent 4 }}
spec:
  secretName: rabbitmq-server-certificate
  issuerRef:
    name: letsencrypt-dns-prod
    kind: ClusterIssuer
  dnsNames:
{{ toYaml .Values.rabbitmq.hosts | indent 2 }}
{{- end }}
