Skip to content

Commit

Permalink
add assert that clientset should be non-nil
Browse files Browse the repository at this point in the history
  • Loading branch information
rquitales committed May 28, 2024
1 parent abe15fb commit 2616e49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions provider/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2681,6 +2681,7 @@ func (k *kubeProvider) gvkFromURN(urn resource.URN) (schema.GroupVersionKind, er

func (k *kubeProvider) readLiveObject(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) {
contract.Assertf(obj.GetName() != "", "expected object name to be nonempty: %v", obj)
contract.Assertf(k.clientSet != nil, "expected Kubernetes client-set to be non-nil")
rc, err := k.clientSet.ResourceClientForObject(obj)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2616e49

Please sign in to comment.