{{- if .Values.mtls.enabled }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: {{ include "rustfs.fullname" . }}-client-tls
  namespace: {{ .Release.Namespace }}
spec:
  secretName: {{ include "rustfs.fullname" . }}-client-tls
  issuerRef:
    name: {{ include "rustfs.fullname" . }}-ca-issuer
    kind: Issuer
  commonName: {{ include "rustfs.fullname" . }}-cluster
  usages:
    - client auth
{{- end }}
