You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a condition to specify externalTrafficPolicy in the apisix-gateway service spec only for service types LoadBalancer and NodePort. Adding the field for service type ClusterIP leads to configuration errors in Kubernetes.
Confirming this is still needed on the current chart (apisix 2.17.0, APISIX 3.18.0). With service.type: ClusterIP, the install fails on Kubernetes 1.35:
Error: INSTALLATION FAILED: 1 error occurred:
* Service "apisix-gateway" is invalid: spec.externalTrafficPolicy: Invalid value: "Cluster": may only be set for externally-accessible services
The template sets externalTrafficPolicy unconditionally, and the API server accepts it only on LoadBalancer and NodePort Services. This PR renders it for exactly those two types, so a ClusterIP gateway installs and the other types are unchanged. Fronting the gateway with an Ingress or a cloud load balancer is a common reason to want ClusterIP, as #755 and #780 describe.
The workaround in the meantime, for anyone landing here, is service.externalTrafficPolicy: null in the values.
Could a maintainer review this? It fixes #755, open since May 2024. Earlier attempts at the same fix (#792, #816) went stale without review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a condition to specify
externalTrafficPolicyin the apisix-gateway service spec only for service types LoadBalancer and NodePort. Adding the field for service type ClusterIP leads to configuration errors in Kubernetes.