rancher-partner-charts/charts/aquarist-labs/s3gw/templates/tls-issuer.yaml

50 lines
1.3 KiB
YAML

{{- if .Values.useCertManager }}
{{- if eq .Values.tlsIssuer "s3gw-issuer" }}
---
# Self-signed issuer
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}-self-signed-issuer
labels:
{{ include "s3gw.labels" . | indent 4}}
spec:
selfSigned: {}
---
# Private s3gw-ca issuer
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}-issuer
labels:
{{ include "s3gw.labels" . | indent 4}}
spec:
ca:
secretName: {{ .Release.Name }}-{{ .Release.Namespace }}-ca-root
{{- else if eq .Values.tlsIssuer "s3gw-letsencrypt-issuer" }}
---
# Let's encrypt production issuer
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}-letsencrypt-issuer
labels:
{{ include "s3gw.labels" . | indent 4}}
spec:
acme:
email: {{ .Values.email }}
preferredChain: ""
privateKeySecretRef:
name: {{ .Release.Name }}-{{ .Release.Namespace }}-letsencrypt
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- http01:
ingress:
ingressTemplate:
metadata:
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
{{- end }}
{{- end }}