The Unified and Autonomous Development Platform
chore: add ingress.tls.acme section into values.yaml
Robin Shen7086d1f6051c
diff --git a/server-product/helm/templates/ingress.yaml b/server-product/helm/templates/ingress.yamlindex 26b8ac5272..412f645728 100644--- a/server-product/helm/templates/ingress.yaml+++ b/server-product/helm/templates/ingress.yaml@@ -17,8 +17,11 @@ metadata:namespace: {{ .Release.Namespace }}labels:{{ include "ods.labels" . | indent 4 }}- {{- if .Values.ingress.annotations }}annotations:+ {{- if $.Values.ingress.tls.acme.enabled }}+ cert-manager.io/issuer: "{{ include "ods.fullname" . }}"+ {{- end }}+ {{- if .Values.ingress.annotations }}{{ toYaml .Values.ingress.annotations | indent 4 }}{{- end }}spec:diff --git a/server-product/helm/templates/issuer.yaml b/server-product/helm/templates/issuer.yamlnew file mode 100644index 0000000000..1694daeb27--- /dev/null+++ b/server-product/helm/templates/issuer.yaml@@ -0,0 +1,22 @@+{{- if .Values.ingress.tls.acme.enabled -}}+apiVersion: cert-manager.io/v1+kind: Issuer+metadata:+ name: {{ include "ods.fullname" . }}+spec:+ acme:+{{- if eq $.Values.ingress.tls.acme.type "letsencrypt" }}+{{- if .Values.ingress.tls.acme.production }}+ server: https://acme-v02.api.letsencrypt.org/directory+{{- else }}+ server: https://acme-staging-v02.api.letsencrypt.org/directory+{{- end }}+{{- end }}+ email: {{ .Values.ingress.tls.acme.email }}+ privateKeySecretRef:+ name: {{ include "ods.fullname" . }}-privkey+ solvers:+ - http01:+ ingress:+ class: {{ .Values.ingress.className }}+{{- end }}diff --git a/server-product/helm/values.yaml b/server-product/helm/values.yamlindex 24a3338282..1919f35f70 100644--- a/server-product/helm/values.yaml+++ b/server-product/helm/values.yaml@@ -235,6 +235,17 @@ ingress:tls:enabled: falsesecretName: "onedev-tls"+ acme:+ # ingress.tls.acme.enabled -- If **true**, create certificate issuer resource+ enabled: false+ # ingress.tls.acme.type -- Specify ACME type. Currently only supports letsencrypt+ type: "letsencrypt"+ # ingress.tls.acme.email -- Email to send certificate status notice+ email: [email protected]+ # ingress.tls.acme.production -- If **true**, generate a production certificate;+ # otherwise generate staging certificate. Set this to **false** to avoid reaching+ # rate limit while you are testing your setup+ production: false# extraVolumes -- Specify additional Volumes to use.extraVolumes: []