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 openshift-merge-bot[bot] committed Jun 12, 2024
1 parent 4bb06f7 commit a240988
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 a240988

Please sign in to comment.