compatible with two clusters

This commit is contained in:
mangomqy
2025-11-12 07:26:18 +00:00
parent a158e24d3f
commit 7ad1018f25
7 changed files with 411 additions and 35 deletions

View File

@ -18,7 +18,7 @@ kind: Service
metadata:
name: {{ .Release.Name }}-svc
spec:
type: {{ .Values.svc.type | default "NodePort" }}
type: {{ .Values.svc.type | default "LoadBalancer" }}
{{- if gt (int .Values.workerSize) 1 }}
selector:
leaderworkerset.sigs.k8s.io/name: {{ .Release.Name }}
@ -29,7 +29,7 @@ spec:
{{- end }}
ports:
- protocol: TCP
port: {{ .Values.svc.port | default 8080 }}
targetPort: {{ .Values.svc.port | default 8080 }}
nodePort: {{ .Values.svc.nodePort | default 30080 }}
port: {{ .Values.svc.port | default 80 }}
targetPort: {{ .Values.svc.targetPort | default 8080 }}
# nodePort: {{ .Values.svc.nodePort | default 30080 }}