I'm experiencing some problems using the list method with custom resources. I will lay out a minimal working example below using the example from the k8s docs
However if I try to list objects of this resource:
cron_list = client.list(cron_resource, namespace="default")
for obj in cron_list:
print(obj)
Then I end up getting an infinite loop, when there should just be one object.
Another issue is when no objects of the requested resource exist:
cron_list = client.list(cron_resource, namespace="nonexistent-namespace")
for obj in cron_list:
print(obj)
Then the loop just hangs.
The list method works fine whenever its used with a lightkube resource:
cm_list = client.list(ConfigMap, namespace="default")
for obj in cm_list:
print(obj)
so it seems to be specific to custom resources. Let me know if you need any other information from me. Being able to list custom resources is very important to me right now and Id love to help get to the bottom of it.
Hi, it seems that the list response for custom resources differ from what is returned for standard resources. I adapted the check to address that. Please take a look at #26.
I'm experiencing some problems using the list method with custom resources. I will lay out a minimal working example below using the example from the k8s docs
First create the CRD defined here
Then create a custom object defined here
Verify it exists:
I can then use the get method on this newly created object just fine:
However if I try to list objects of this resource:
Then I end up getting an infinite loop, when there should just be one object.
Another issue is when no objects of the requested resource exist:
Then the loop just hangs.
The list method works fine whenever its used with a lightkube resource:
so it seems to be specific to custom resources. Let me know if you need any other information from me. Being able to list custom resources is very important to me right now and Id love to help get to the bottom of it.