{{- if .Values.scanner.api.tlsEnabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "harbor-scanner-trivy.fullname" . }}-tls
  labels:
{{ include "harbor-scanner-trivy.labels" . | indent 4 }}
type: kubernetes.io/tls
data:
  tls.crt: {{ required "TLS certificate required!" .Values.scanner.api.tlsCertificate | b64enc | quote }}
  tls.key: {{ required "TLS key required!" .Values.scanner.api.tlsKey | b64enc | quote }}
{{- end }}
