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 #10079

Conversation

bartsmykla
Copy link
Contributor

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.

Closes: #10074

Checklist prior to review

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>
@bartsmykla bartsmykla added area/gateway Built-in Kuma gateway support backport labels Apr 25, 2024
@bartsmykla bartsmykla requested a review from a team as a code owner April 25, 2024 11:48
@bartsmykla bartsmykla requested review from slonka and removed request for a team April 25, 2024 11:48
@jakubdyszkiewicz
Copy link
Contributor

can you make it to release 2.7? so instead of backport we will merge release to master?

@bartsmykla bartsmykla changed the title fix(gatewayapi): validate presence of all necessary gapi resources fix(gatewayapi): validate presence of all required Gateway API resources Apr 25, 2024
@bartsmykla bartsmykla merged commit 79d58a0 into kumahq:master Apr 25, 2024
20 of 21 checks passed
@bartsmykla bartsmykla deleted the fix/validate-all-necessary-gatewayapi-resources branch April 25, 2024 12:37
Copy link
Contributor

github-actions bot commented Apr 25, 2024

backporting to release-2.5 with action

backporting to release-2.4 with action
backporting to release-2.7 with action
backporting to release-2.3 with action

kumahq bot pushed a commit that referenced this pull request Apr 25, 2024
…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 bot pushed a commit that referenced this pull request Apr 25, 2024
…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 bot pushed a commit that referenced this pull request Apr 25, 2024
…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 bot pushed a commit that referenced this pull request Apr 25, 2024
…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 bot pushed a commit that referenced this pull request Apr 25, 2024
…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>
bartsmykla added a commit that referenced this pull request Apr 25, 2024
…ces (backport of #10079) (#10082)

fix(gatewayapi): validate presence of all required Gateway API resources (#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>
Co-authored-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Apr 25, 2024
…ces (backport of #10079) (#10083)

* fix(gatewayapi): validate presence of all required Gateway API resources (#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>

---------

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Apr 25, 2024
…ces (backport of #10079) (#10081)

* fix(gatewayapi): validate presence of all required Gateway API resources (#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>

---------

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Apr 25, 2024
…ces (backport of #10079) (#10084)

* fix(gatewayapi): validate presence of all required Gateway API resources (#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>

---------

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Apr 25, 2024
…ces (backport of #10079) (#10080)

* fix(gatewayapi): validate presence of all required Gateway API resources (#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>

---------

Signed-off-by: Bart Smykla <bartek@smykla.com>
Co-authored-by: Bart Smykla <bartek@smykla.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway Built-in Kuma gateway support backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve verification if Gateway API CRDs are present in a cluster
3 participants