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

fix(gatewayapi): validate presence of all required Gateway API resources (backport of #10079) #10084

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

kumahq[bot]
Copy link
Contributor

@kumahq kumahq bot commented Apr 25, 2024

Automatic cherry-pick of #10079 for branch release-2.6

Generated by action

cherry-picked commit 79d58a0
⚠️ ⚠️ ⚠️ Conflicts happened when cherry-picking! ⚠️ ⚠️ ⚠️

On branch release-2.6
Your branch is up to date with 'origin/release-2.6'.

You are currently cherry-picking commit 79d58a04a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   pkg/plugins/runtime/k8s/plugin_gateway.go

no changes added to commit (use "git add" and/or "git commit -a")

…ces (#10079)

Existing check of presence for only `Gateway` resource is
insufficient in situation when some (not all) of the Gateway API
CRDs are missing (i.e. package with CRDs was installed before
`ReferenceGrant` was added), which causes CP to start throwing
lot of errors:

```
controller-runtime.source.EventHandler	if kind is a CRD, it should
be installed before calling Start	{"kind":
"ReferenceGrant.gateway.networking.k8s.io", "error": "no matches
for kind \"ReferenceGrant\" in version
\"gateway.networking.k8s.io/v1beta1\""}
```

This is the simplest solution as we could also verify if
`ReferenceGrant` is present, and if not to disable cross-mesh
references, but it would be unnecesarily complex, especially
in situation when Gateway API is GA and contains `ReferenceGrant`
in `v1`.

Signed-off-by: Bart Smykla <bartek@smykla.com>
@kumahq kumahq bot requested a review from a team as a code owner April 25, 2024 12:38
@kumahq kumahq bot removed the request for review from a team April 25, 2024 12:38
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla merged commit 4a3f4f8 into release-2.6 Apr 25, 2024
12 checks passed
@bartsmykla bartsmykla deleted the chore/backport-release-2.6-10079 branch April 25, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant