{{- if and (not .Values.nginx.tlsSecretName) .Values.nginx.enabled }}
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
metadata:
  name: {{ template "artifactory-ha.fullname" . }}-nginx-certificate
  labels:
    app: {{ template "artifactory-ha.name" . }}
    chart: {{ template "artifactory-ha.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
data:
{{ ( include "artifactory-ha.gen-certs" . ) | indent 2 }}
{{- end }}
