Skip to content

The Unified and Autonomous Development Platform

feat: seperate ssh service manifest

Khaliq76a79a4591fa
diff --git a/server-product/helm/templates/ssh-service.yaml b/server-product/helm/templates/ssh-service.yaml
new file mode 100644
index 0000000000..acd816c9a5
--- /dev/null
+++ b/server-product/helm/templates/ssh-service.yaml
@@ -0,0 +1,55 @@
+---
+{{ $ssh := .Values.service.separateSSHService }}
+{{- if $ssh.enabled -}}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "ods.fullname" . }}-ssh
+ namespace: {{ .Release.Namespace }}
+ labels: {{ include "ods.labels" . | nindent 4 }}
+ {{- if $ssh.annotations }}
+ annotations: {{ toYaml $ssh.annotations | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ $ssh.type }}
+{{- if eq $ssh.type "LoadBalancer" }}
+{{- if $ssh.loadBalancerIP }}
+ loadBalancerIP: {{ $ssh.loadBalancerIP }}
+{{- end -}}
+{{- if $ssh.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges:
+{{- range $ssh.loadBalancerSourceRanges }}
+ - {{ . }}
+{{- end }}
+{{- end }}
+{{- end }}
+{{- if and $ssh.clusterIP (eq $ssh.type "ClusterIP") }}
+ clusterIP: {{ $ssh.clusterIP }}
+{{- end }}
+{{- if $ssh.externalIPs }}
+ externalIPs:
+ {{- toYaml $ssh.externalIPs | nindent 4 }}
+{{- end }}
+{{- if $ssh.ipFamilyPolicy }}
+ ipFamilyPolicy: {{ $ssh.ipFamilyPolicy }}
+{{- end }}
+{{- with $ssh.ipFamilies }}
+ ipFamilies:
+{{- toYaml . | nindent 4 }}
+{{- end -}}
+{{- if $ssh.externalTrafficPolicy }}
+ externalTrafficPolicy: {{ $ssh.externalTrafficPolicy }}
+{{- end }}
+ ports:
+ - name: ssh
+ port: {{ default "6611" $ssh.port }}
+ targetPort: ssh
+ protocol: TCP
+{{- if $ssh.nodePort }}
+ nodePort: {{ $ssh.nodePort }}
+{{- end }}
+ selector: {{ include "ods.template-labels" . | nindent 4 }}
+{{- if $ssh.topologyKeys }}
+ topologyKeys: {{ toYaml $ssh.topologyKeys | nindent 4 }}
+ {{- end }}
+{{- end -}}