diff --git a/charts/jumpserver/templates/koko/service-koko.yaml b/charts/jumpserver/templates/koko/service-koko.yaml index 268bd1d..a7d9e8f 100644 --- a/charts/jumpserver/templates/koko/service-koko.yaml +++ b/charts/jumpserver/templates/koko/service-koko.yaml @@ -19,6 +19,9 @@ spec: name: web - port: {{ .service.ssh.port }} targetPort: ssh + {{- if eq .service.type "NodePort" }} + nodePort: {{ .service.ssh.port }} + {{- end }} protocol: TCP name: ssh sessionAffinity: ClientIP diff --git a/charts/jumpserver/templates/magnus/service-magnus.yaml b/charts/jumpserver/templates/magnus/service-magnus.yaml index 85dc245..27a967c 100644 --- a/charts/jumpserver/templates/magnus/service-magnus.yaml +++ b/charts/jumpserver/templates/magnus/service-magnus.yaml @@ -17,6 +17,9 @@ spec: ports: {{- range $port := untilStep $magnusPortStart $magnusPortEnd 1 }} - port: {{ $port }} + {{- if eq $.Values.magnus.service.type "NodePort" }} + nodePort: {{ $port }} + {{- end }} targetPort: magnus-{{ $port }} protocol: TCP name: magnus-{{ $port }} diff --git a/charts/jumpserver/templates/razor/service-razor.yaml b/charts/jumpserver/templates/razor/service-razor.yaml index 24bd193..6848dde 100644 --- a/charts/jumpserver/templates/razor/service-razor.yaml +++ b/charts/jumpserver/templates/razor/service-razor.yaml @@ -15,6 +15,9 @@ spec: ports: - port: {{ .service.rdp.port }} targetPort: rdp + {{- if eq .service.type "NodePort" }} + nodePort: {{ .service.rdp.port }} + {{- end }} protocol: TCP name: rdp sessionAffinity: ClientIP diff --git a/charts/jumpserver/templates/web/service-web.yaml b/charts/jumpserver/templates/web/service-web.yaml index f75e8c2..31c9169 100644 --- a/charts/jumpserver/templates/web/service-web.yaml +++ b/charts/jumpserver/templates/web/service-web.yaml @@ -15,6 +15,9 @@ spec: ports: - port: {{ .service.web.port }} targetPort: web + {{- if eq .service.type "NodePort" }} + nodePort: {{ .service.web.port }} + {{- end }} protocol: TCP name: web sessionAffinity: ClientIP