The Unified and Autonomous Development Platform
chore: add ingress.tls.enabled to turn tls on/off easier
Robin Shenc8af1e88d34b
diff --git a/server-product/helm/templates/NOTES.txt b/server-product/helm/templates/NOTES.txtindex 8ef1934c75..ab7e08b7c4 100644--- a/server-product/helm/templates/NOTES.txt+++ b/server-product/helm/templates/NOTES.txt@@ -18,7 +18,11 @@ APP VERSION: {{ .Chart.AppVersion }}1. You can access OneDev at:+{{- if .Values.ingress.tls.enabled }}+ https://{{ .Values.ingress.host }}+{{- else }}http://{{ .Values.ingress.host }}+{{- end }}{{- else }}diff --git a/server-product/helm/templates/ingress.yaml b/server-product/helm/templates/ingress.yamlindex 405512d144..d574f06359 100644--- a/server-product/helm/templates/ingress.yaml+++ b/server-product/helm/templates/ingress.yaml@@ -25,7 +25,7 @@ spec:{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}ingressClassName: {{ .Values.ingress.className }}{{- end }}- {{- if .Values.ingress.tls }}+ {{- if .Values.ingress.tls.enabled }}tls:- hosts:- {{ .Values.ingress.tls.host }}@@ -47,10 +47,10 @@ spec:{{- if .Values.ingress.port.name }}name: {{ .Values.ingress.port.name }}{{- else }}- number: {{ default "6610" .Values.service.ports.http }}+ number: {{ default "80" .Values.service.ports.http }}{{- end }}{{- else }}serviceName: {{ include "ods.fullname" $ }}- servicePort: {{ default "6610" .Values.service.ports.http }}+ servicePort: {{ default "80" .Values.service.ports.http }}{{- end }}{{- end }}diff --git a/server-product/helm/values.yaml b/server-product/helm/values.yamlindex 9777acd3cf..13c2026a03 100644--- a/server-product/helm/values.yaml+++ b/server-product/helm/values.yaml@@ -234,10 +234,12 @@ ingress:# Using name requires Kubernetes >=1.19port:name: "http"+# ingress.tls -- Configure TLS for the Ingress.- tls: {}- # secretName: wildcard-tls- # host: onedev.example.com+ tls:+ enabled: false+ secretName: "onedev-tls"+ host: onedev.example.com# extraVolumes -- Specify additional Volumes to use.extraVolumes: []