{{/* If shared-secrets is disable, manual secret creation will be needed */}}
{{- if not (index .Values "shared-secrets").enabled }}
The automatic generation of secrets has been disabled by `shared-secrets.enabled: false`.
The user should ensure all necessary secrets are created according to documentation, or
the deployment will fail to operate correctly.

{{- end }}
{{/* If using self-signed auto-generated certificates, and a service needing them is enabled */}}
{{- if or .Values.gitlab.unicorn.enabled (or .Values.registry.enabled .Values.global.minio.enabled) -}}
{{- if not (or .Values.global.ingress.configureCertmanager (include "gitlab.ingress.tls.configured" .)) -}}
WARNING: Automatic TLS certificate generation with cert-manager is disabled and no TLS certificates were provided. Self-signed certificates were generated.

You may retrieve the CA root for these certificates from the `{{ template "gitlab.wildcard-self-signed-cert-name" $ }}-ca` secret, via the following command. It can then be imported to a web browser or system store.

    kubectl get secret {{ template "gitlab.wildcard-self-signed-cert-name" $ }}-ca -ojsonpath='{.data.cfssl_ca}' | base64 --decode > {{ template "gitlab.gitlab.hostname" $ }}.ca.pem

If you do not wish to use self-signed certificates, please set the following properties:
  - global.ingress.tls.secretName
  OR
{{- if $.Values.gitlab.unicorn.enabled }}
  - gitlab.unicorn.ingress.tls.secretName
{{- end -}}
{{- if $.Values.registry.enabled }}
  - registry.ingress.tls.secretName
{{- end -}}
{{- if $.Values.global.minio.enabled }}
  - minio.ingress.tls.secretName
{{- end }}

{{ if (index .Values "gitlab-runner").install }}
WARNING: Automatic TLS certificate generation with cert-manager is disabled and no TLS certificates were provided. Self-signed certificates were generated that do not work with gitlab-runner. Please either disable gitlab-runner by setting `gitlab-runner.install=false` or provide valid certificates.
{{- end -}}
{{- end -}}
{{- end -}}
{{/* run deprecations */}}
{{ include "gitlab.deprecations" . }}
