From 61963bb03f372b9b0aaa02252bb3cbdadccd3f87 Mon Sep 17 00:00:00 2001 From: casell Date: Thu, 28 Nov 2024 11:16:18 +0100 Subject: [PATCH] Removed externaltrafficpolicy if not loadbalancer Fix for https://github.com/apache/apisix-helm-chart/issues/780 --- charts/apisix/templates/service-gateway.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/apisix/templates/service-gateway.yaml b/charts/apisix/templates/service-gateway.yaml index 7797435a..4fdb532b 100644 --- a/charts/apisix/templates/service-gateway.yaml +++ b/charts/apisix/templates/service-gateway.yaml @@ -28,8 +28,8 @@ metadata: app.kubernetes.io/service: apisix-gateway spec: type: {{ .Values.service.type }} - externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} {{- if eq .Values.service.type "LoadBalancer" }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} {{- if .Values.service.loadBalancerIP }} loadBalancerIP: {{ .Values.service.loadBalancerIP }} {{- end }}