{{- if and (or .Values.gatewayApi.enabled .Values.ingress.tls.enabled) (not .Values.ingress.tls.certManager.enabled) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "rustfs.fullname" . }}-tls
  labels:
    {{- toYaml .Values.commonLabels | nindent 4 }}
type: kubernetes.io/tls
data:
  tls.crt : {{ .Values.ingress.tls.crt | b64enc | quote }}
  tls.key : {{ .Values.ingress.tls.key | b64enc | quote }}
{{- end }}
