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 }}