Skip to content

The Unified and Autonomous Development Platform

fix: set ports from svc values or display default

Khaliq0336a6ef536b
diff --git a/server-product/helm/templates/NOTES.txt b/server-product/helm/templates/NOTES.txt
index 1c84fdb03f..7c597075ae 100644
--- a/server-product/helm/templates/NOTES.txt
+++ b/server-product/helm/templates/NOTES.txt
@@ -19,9 +19,9 @@ APP VERSION: {{ .Chart.AppVersion }}
{{- if contains "ClusterIP" .Values.service.type }}
- kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "ods.fullname" . }} 8080:6610 &
+ kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "ods.fullname" . }} {{ default "6610" .Values.service.ports.httpPort }}:6610 &
- URL: http://127.0.0.1:8080/
+ URL: http://127.0.0.1:{{ default "6610" .Values.service.ports.httpPort }}/
{{- else if contains "LoadBalancer" .Values.service.type }}
@@ -30,7 +30,7 @@ APP VERSION: {{ .Chart.AppVersion }}
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ods.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
- echo "URL: http://$SERVICE_IP:6610/"
+ echo "URL: http://$SERVICE_IP:{{ default "6610" .Values.service.ports.httpPort }}/"
{{- end }}
{{- end }}
@@ -38,4 +38,4 @@ APP VERSION: {{ .Chart.AppVersion }}
2. Login with the following credentials:
Username: {{ .Values.onedev.initSettings.user }}
- echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "ods.fullname" . }}-secrets -o jsonpath="{.data.password}" | base64 -d)
+ echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "ods.fullname" . }}-secrets -o jsonpath="{.data.password}" | base64 -d)
\ No newline at end of file