chore: update Envoy Gateway to v1.5.0#4130
Conversation
nelljerram
left a comment
There was a problem hiding this comment.
I'd like to understand the MutatingWebhook better.
- What does it do?
- It is correct to configure it before the gateway controller is deployed?
We'll need doc updates for the CRD changes. BackendLBPolicy removed, XBackendTraffic and XListenerSet added, and version changes for other CRDs.
A few other specific points.
| "github.com/tigera/operator/pkg/controller/utils/imageset" | ||
| "github.com/tigera/operator/pkg/ctrlruntime" | ||
| "github.com/tigera/operator/pkg/render" | ||
| "github.com/tigera/operator/pkg/render/gatewayapi" |
There was a problem hiding this comment.
Moving the gateway API rendering into its own package seems like a nice move to me, but I'd appreciate an operator-dev OK'ing this as well, in case there's some gotcha with not having all of our rendering in a single package.
There was a problem hiding this comment.
we do already have existing component-specific subdirectories under pkg/render.. so I think that's okay? (cc @tigera/tigera-operator-maintainers maybe i'm not seeing something here)
| result, err := r.Reconcile(ctx, reconcile.Request{}) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| Expect(result.RequeueAfter).To(Equal(0 * time.Second)) | ||
| Expect(result.RequeueAfterAfter).To(Equal(0 * time.Second)) |
There was a problem hiding this comment.
Really? That's such an obviously terrible name. But I presume this isn't your choice at all. Out of interest do you have a pointer to the deprecation notice?
There was a problem hiding this comment.
sorry that was a search-and-replace fail!
here's the specific release we've upgrade to, take a look at Breaking Changes https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.21.0
| for _, mwc := range resources.mutatingWebhookConfigurations { | ||
| objs = append(objs, mwc.DeepCopyObject().(client.Object)) | ||
| } | ||
| for _, resource := range []client.Object{ |
There was a problem hiding this comment.
Please note that this function is quite careful about the order of objsToCreate - so that when object A depends on other objects {B}, {B} are emitted first, then A. Considering the insertions here:
- I think the extra cluster role (binding) for certgen job is fine, because the job itself is created later.
- Not sure about the mutating web hook. Does this depend on the envoy-gateway controller already running, since that what it points to? Perhaps it's fine because of its policy to ignore failures. I'm curious what happens later when the envoy-gateway controller is actually deployed... then the webhook fires and tries to call the controller while it's still being created?
There was a problem hiding this comment.
@nelljerram apparently the webhook's only job is to label gateway proxy pods with node topology labels. these seem to be mostly informational doesn't seem to affect operation. perhaps it's used for something else? taxonomy purposes?
|
PR description mentions a new |
|
UT failures look related to the Requeue -> RequeueAfter change |
|
https://gateway.envoyproxy.io/news/releases/v1.5/ says:
Is that going to need changes to our WAF implementation? |
yes you're right.. looks like it's deprecated in 1.5, removed in 1.6. it doesn't change the WAF implementation but it will affect the documentation: https://docs.tigera.io/calico-enterprise/3.22/threat/deploying-waf-ingress-gateway#customizing-your-waf-configuration-for-an-ingress-gateway that's fine, seems like a quick change after this PR is merged. |
updated the description
now fixed, i think! |
5d66178 to
db949c3
Compare
It still says "SecurityPolicy" in the PR description, unless my eyes are fooling me! |
| result, err := r.Reconcile(ctx, reconcile.Request{}) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| Expect(result.RequeueAfter).To(Equal(0 * time.Second)) | ||
| Expect(result.RequeueAfterAfter).To(Equal(0 * time.Second)) |
db949c3 to
bf31c81
Compare
Update Envoy Gateway from the previous version to v1.5.0 following the provided upgrade instructions. - **Dependencies**: Updated `go.mod` to use Envoy Gateway v1.5.0 - **Configuration**: Updated `Makefile` to use `envoy-gateway/gateway-helm` chart reference - **Resources**: Regenerated `pkg/render/gateway_api_resources.yaml` with updated resources (40,569 lines) - **Tests**: Fixed CRD count expectation in `pkg/render/gateway_api.go` from 11 to 10 k8s CRDs (SecurityPolicy is now an envoy CRD) - ✅ All Gateway tests passing (11/11) - ✅ All unit tests passing (66 suites) - ✅ No regressions introduced This update includes new Envoy Gateway v1.5.0 features such as the SecurityPolicy CRD and other enhancements. - Ran focused Gateway API tests with `go test ./pkg/render -v -ginkgo.focus ".*Gateway.*"` - Executed full unit test suite with `make ut` - All tests pass successfully
c5b32a1 to
970ec04
Compare
|
@electricjesus Is your last commit a necessary part of bumping to 1.5.0 ? |
…deletion" This reverts commit c2020d8.
|
@nelljerram no that's not necessary, just trying to figure out why that FV is timing out. seems that it does tend to help so i separated the tweaks out to its own PR: #4150 also reverted the commit |
…deletion" This reverts commit e4f5fdd.
…-v1.40 chore: update Envoy Gateway to v1.5.0 (#4130)
Summary
Update Envoy Gateway from the previous version to v1.5.0 following the provided upgrade instructions.
Changes Made
go.modto use Envoy Gateway v1.5.0Makefileto useenvoy-gateway/gateway-helmchart referencepkg/render/gateway_api_resources.yamlwith updated resourcespkg/render/gateway_api.gofrom 11 to 10 k8s CRDs, fixed resource render expectation from 17 to 21 (20 core resources + 1 resource per envoygatewayclass)The following CRDs are packaged in this change
Gateway API-Specific CRDs
gateway.networking.x-k8s.io).gateway.networking.x-k8s.io).Envoy-Specific CRDs
gateway.envoyproxy.io).gateway.envoyproxy.io).gateway.envoyproxy.io).gateway.envoyproxy.io).gateway.envoyproxy.io).gateway.envoyproxy.io).gateway.envoyproxy.io).gateway.envoyproxy.io).New Features
This update includes new Envoy Gateway v1.5.0 features such as the SecurityPolicy CRD and other enhancements.
Testing
go test ./pkg/render -v -ginkgo.focus ".*Gateway.*"make utDescription
Release Note
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bugfix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.