Skip to content
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

gateway-api: don't register secretsync if required CRDs aren't present #29437

Merged

Conversation

mhofstetter
Copy link
Member

@mhofstetter mhofstetter commented Nov 28, 2023

With #28982 a check got introduced that disables the Gateway API functionality if the required Gateway API CRDs aren't installed in the cluster.

But this check is not executed when the secret sync registrations is performed.

This leads to situations where the CRD isn't registered to the schema, but secretsync registering watches for this CRD. This results in failures in the secret-sync:

level=error msg="kind must be registered to the Scheme" error="no kind is registered for the type v1.Gateway in scheme \"k8s.io/client-go/kubernetes/scheme/register.go:80\"" logger=controller-runtime.source.EventHandler subsys=controller-runtime

Therefore, this commit adds the check to the secret sync registration too.

Fixes: #29100

With cilium#28982 a check got introduced that disables the Gateway API functionality
if the required Gateway API CRDs aren't installed in the cluster.

But this check is not executed when the secret sync registrations is performed.

This results in failures in the secret-sync:

```
level=error msg="kind must be registered to the Scheme" error="no kind is registered for the type v1.Gateway in scheme \"k8s.io/client-go/kubernetes/scheme/register.go:80\"" logger=controller-runtime.source.EventHandler subsys=controller-runtime
```

Therefore, this commit adds the check to the secret sync registration too.

Fixes: cilium#29100

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. release-note/misc This PR makes changes that have no direct user impact. area/servicemesh GH issues or PRs regarding servicemesh feature/k8s-gateway-api labels Nov 28, 2023
@mhofstetter mhofstetter marked this pull request as ready for review November 28, 2023 11:39
@mhofstetter mhofstetter requested a review from a team as a code owner November 28, 2023 11:39
@mhofstetter
Copy link
Member Author

/test

@mhofstetter mhofstetter removed the request for review from youngnick November 29, 2023 13:25
@mhofstetter
Copy link
Member Author

Removed @youngnick because @sayboras already covers sig-servicemesh. marking as ready-to-merge

@mhofstetter mhofstetter added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 29, 2023
@youngnick youngnick added this pull request to the merge queue Nov 29, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 30, 2023
@youngnick youngnick added this pull request to the merge queue Nov 30, 2023
Merged via the queue into cilium:main with commit 7f0c7d2 Nov 30, 2023
63 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/gateway-api-secretsync-fix branch November 30, 2023 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/servicemesh GH issues or PRs regarding servicemesh feature/k8s-gateway-api kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants