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 Apr 4, 2024
1 parent 08e9b7b commit 4c5ddc8
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 @@ -430,7 +430,10 @@ func handleCRDAdd(cl *Client, 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 4c5ddc8

Please sign in to comment.