Skip to content

Commit fe855a7

Browse files
authored
fix: externalTrafficPolicy only for service type NodePort or LoadBalancer (#128)
1 parent dd3b233 commit fe855a7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

charts/gateway/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type: application
1414
# This is the chart version. This version number should be incremented each time you make changes
1515
# to the chart and its templates, including the app version.
1616
# Versions are expected to follow Semantic Versioning (https://semver.org/)
17-
version: 0.1.7
17+
version: 0.1.8
1818

1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to

charts/gateway/templates/service-gateway.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ metadata:
1313
app.kubernetes.io/service: apisix-gateway
1414
spec:
1515
type: {{ .Values.gateway.type }}
16+
{{- if or (eq .Values.gateway.type "NodePort") (eq .Values.gateway.type "LoadBalancer") }}
1617
externalTrafficPolicy: {{ .Values.gateway.externalTrafficPolicy }}
18+
{{- end }}
1719
{{- if eq .Values.gateway.type "LoadBalancer" }}
1820
{{- if .Values.gateway.loadBalancerIP }}
1921
loadBalancerIP: {{ .Values.gateway.loadBalancerIP }}

0 commit comments

Comments
 (0)