You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ga...@apache.org on 2023/09/30 11:31:05 UTC

[apisix-helm-chart] branch master updated: Avoid templating externalTrafficPolicy when gateway.type is ClusterIP (#589)

This is an automated email from the ASF dual-hosted git repository.

gallardot pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new d48f244  Avoid templating externalTrafficPolicy when gateway.type is ClusterIP (#589)
d48f244 is described below

commit d48f2447107757910c1ee858a6eeb4fa97a9c617
Author: Andrea <an...@gmail.com>
AuthorDate: Sat Sep 30 13:31:00 2023 +0200

    Avoid templating externalTrafficPolicy when gateway.type is ClusterIP (#589)
---
 charts/apisix/templates/service-gateway.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/charts/apisix/templates/service-gateway.yaml b/charts/apisix/templates/service-gateway.yaml
index 7ba5baf..17331f8 100644
--- a/charts/apisix/templates/service-gateway.yaml
+++ b/charts/apisix/templates/service-gateway.yaml
@@ -29,7 +29,9 @@ metadata:
     app.kubernetes.io/service: apisix-gateway
 spec:
   type: {{ .Values.gateway.type }}
+  {{- if or (eq .Values.gateway.type "LoadBalancer") (eq .Values.gateway.type "NodePort") }}
   externalTrafficPolicy: {{ .Values.gateway.externalTrafficPolicy }}
+  {{- end }}
   {{- if eq .Values.gateway.type "LoadBalancer" }}
   {{- if .Values.gateway.loadBalancerIP }}
   loadBalancerIP: {{ .Values.gateway.loadBalancerIP }}