Skip to content

Commit

Permalink
fix for k8s gateway api init
Browse files Browse the repository at this point in the history
Signed-off-by: yutao04 <yutao04@corp.netease.com>
  • Loading branch information
trickMin committed Mar 20, 2023
1 parent 4eb6c05 commit 2ab437c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ private <T extends HasMetadata, L extends KubernetesResourceList<T>> void regist
log.error("get crd definition error", e);
return;
}
if (crd == null) {
log.error("CRD is null, kind: {}", kind.name());
return;
}
CustomResourceDefinitionContext customResourceDefinitionContext = CustomResourceDefinitionContext.fromCrd(crd);
Indexer<T> indexer = sharedInformerFactory.sharedIndexInformerForCustomResource(
customResourceDefinitionContext,
Expand Down

0 comments on commit 2ab437c

Please sign in to comment.