-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add external traffic policy for gw2 gw params #10420
Conversation
Issues linked to changelog: |
Visit the preview URL for this PR (updated for commit d946524): https://gloo-edge--pr10420-gw2-externaltrafficp-9joq07l1.web.app (expires Sat, 04 Jan 2025 12:20:15 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 77c2b86e287749579b7ff9cadb81e099042ef677 |
projects/gateway2/helm/gloo-gateway/templates/gateway/proxy-deployment.yaml
Show resolved
Hide resolved
…o/gloo into gw2-externaltrafficpolicy
The === RUN TestK8sGateway/RouteOptions/TestConfigureInvalidRouteOptionsWithTargetRef
httproute.gateway.networking.k8s.io/httproute1 created
routeoption.gateway.solo.io/bad-rto-targetref created
=== NAME TestK8sGateway
status.go:73:
Timed out after 20.000s.
The function passed to Eventually failed at /home/runner/work/gloo/gloo/test/kubernetes/testutils/assertions/status.go:72 with:
have matcher for namespace k8s-gw-test which is not found Rerunning job. |
Co-authored-by: Nina Polshakova <nina.polshakova@solo.io> Co-authored-by: changelog-bot <changelog-bot>
Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io> Co-authored-by: Sam Heilbron <SamHeilbron@gmail.com>
Co-authored-by: changelog-bot <changelog-bot>
Co-authored-by: changelog-bot <changelog-bot>
…o/gloo into gw2-externaltrafficpolicy
…o/gloo into gw2-externaltrafficpolicy
The following e2e is related to this PR is failing: === RUN TestK8sGatewayAws/Deployer/TestConfigureProxiesFromGatewayParameters
namespace/nginx created
service/nginx created
configmap/nginx-conf created
pod/nginx created
gatewayparameters.gateway.gloo.solo.io/gw-params-custom created
gateway.gateway.networking.k8s.io/gw created
httproute.gateway.networking.k8s.io/example-route created
gatewayparameters.gateway.gloo.solo.io/gw-params created
=== NAME TestK8sGatewayAws
suite.go:145:
Expected
<v1.ServiceExternalTrafficPolicy>: Cluster
to equal
<v1.ServiceExternalTrafficPolicy>: Local
namespace "nginx" deleted
service "nginx" deleted
configmap "nginx-conf" deleted
pod "nginx" deleted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevin-shelaga PTAL at my review feedback and e2e failure.
// External Traffic Policy on the Service object. | ||
// | ||
// +kubebuilder:validation:Optional | ||
ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicy `json:"externalTrafficPolicy,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general we want default values to be explicitly represented in our APIs (xref).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since ExternalTrafficPolicy
accepts opaque strings, it's important to include a test case for an unintended value. If this test case is not included, please create a tracker issue and xref it.
check for/test invalid values: #10540 |
Description
When using the Kubernetes Gateway API, the provisioned proxy service external traffic policy is now configurable via the GatewayParameters fields spec.kube.service.externalTrafficPolicy
This values can also be set on the default GatewayParameters during install/upgrade using the Helm value kubeGateway.gatewayParameters.glooGateway.service.externalTrafficPolicy
API changes
Added fields to GatewayParameters:
spec.kube.service.externalTrafficPolicy
Code changes
Update gw params to expose external traffic policy
Add test
Context
Fixes kgateway-dev#9879
Users need to be able to change the external traffic policy so that source client IPs are preserved for features like WAF and ext auth.
Testing steps
helm unit tests
deployer unit tests
deployer e2e test
Checklist:
BOT NOTES:
resolves Ability to set "externalTrafficPolicy" in "GatewayParameters" kgateway-dev/kgateway#9879