Skip to content

Commit

Permalink
OSSM-6177 Prevent nil pointer dereference when analysis is enabled an…
Browse files Browse the repository at this point in the history
…d GatewayAPI is disabled (#977)
  • Loading branch information
luksa authored and yannuil committed Jun 3, 2024
1 parent 1631194 commit 5289c53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pilot/pkg/config/kube/crdclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ func (cl *Client) addCRD(name string) {
resourceGVK := s.GroupVersionKind()
gvr := s.GroupVersionResource()

if cl.client.IsMultiTenant() && resourceGVK == gvk.GatewayClass {
if !features.EnableGatewayAPI && s.Group() == gvk.KubernetesGateway.Group {
scope.Infof("Skipping CRD %v as GatewayAPI support is not enabled", s.GroupVersionKind())
return
} else if cl.client.IsMultiTenant() && resourceGVK == gvk.GatewayClass {
scope.Infof("Skipping CRD %v as it is not compatible with maistra multi-tenancy", s.GroupVersionKind())
return
}
Expand Down

0 comments on commit 5289c53

Please sign in to comment.