From 1d358b3ee4d8053ca4a6584d131a2cfec89c5f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=87=91=E8=8F=B1?= <17816873960@163.com> Date: Wed, 6 Sep 2023 19:09:54 +0800 Subject: [PATCH] fix(helm): nodePort paired with serverPort --- helm/templates/service.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml index 6e82664..eb12535 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -42,6 +42,9 @@ spec: ports: - port: {{ .Values.service.port }} targetPort: {{ .Values.nacos.serverPort }} + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} protocol: TCP name: http - port: {{ add .Values.service.port 1000}} @@ -55,9 +58,6 @@ spec: name: old-raft-rpc targetPort: 7848 protocol: TCP - {{- if eq .Values.service.type "NodePort" }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} selector: app.kubernetes.io/name: {{ include "nacos.name" . }} app.kubernetes.io/instance: {{ .Release.Name }}