Skip to content

The Unified and Autonomous Development Platform

fix: don't set ssh port if sep service enabled

Khaliqbbe24672f8fb
diff --git a/server-product/helm/templates/service.yaml b/server-product/helm/templates/service.yaml
index a640988077..61e9fd99f1 100644
--- a/server-product/helm/templates/service.yaml
+++ b/server-product/helm/templates/service.yaml
@@ -9,6 +9,7 @@ metadata:
annotations: {{ toYaml .Values.service.annotations | nindent 4 }}
{{- end }}
spec:
+ type: {{ .Values.service.type }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
@@ -26,12 +27,16 @@ spec:
port: {{ default "6610" .Values.service.ports.httpPort }}
targetPort: http
protocol: TCP
- - name: git-ssh
- port: {{ default "6611" .Values.service.ports.sshPort }}
- targetPort: git-ssh
+{{- if not .Values.service.separateSSHService.enabled }}
+ - name: ssh
+ port: {{ default "22" .Values.service.ports.sshPort }}
+ targetPort: ssh
protocol: TCP
+{{- end }}
+{{- if .Values.service.nodePort }}
+ nodePort: {{ .Values.service.nodePort }}
+ {{- end }}
selector: {{ include "ods.template-labels" . | nindent 4 }}
- type: {{ .Values.service.type }}
{{- if .Values.service.topologyKeys }}
topologyKeys: {{ toYaml .Values.service.topologyKeys | nindent 4 }}
{{- end }}