Add certificate (#107)

This commit is contained in:
Yann Soubeyrand 2019-09-20 01:02:21 +02:00 committed by Alex Collins
parent 04bf19d8a8
commit aff8a78040
3 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,24 @@
{{- if .Values.certificate.enabled -}}
{{- $commonName := regexReplaceAll "^https?://([^/]+)(/.*)?$" .Values.config.url "${1}" }}
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
name: argocd-server
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}
helm.sh/chart: {{ include "argo-cd.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ include "argo-cd.name" . }}
spec:
commonName: {{ $commonName | quote }}
dnsNames:
- {{ $commonName | quote }}
{{- range .Values.ingress.additionalHosts }}
- {{ . | quote }}
{{- end }}
issuerRef:
kind: {{ .Values.certificate.issuer.kind | quote }}
name: {{ .Values.certificate.issuer.name | quote }}
secretName: argocd-secret
{{- end }}