ResourceNotFoundError: No matches found for {'group': 'template.openshift.io', 'api_version': 'v1', 'kind': 'Template'}
darcyllingyan opened this issue · 4 comments
Hi,
When I run the dyn_client.resources.search() to search all the api-resources in cluster, it always report below error. After try with oc api-resources, it shows there are resource with "group: template.openshift.io, version: v1, kind: Template"
Can you help to check? Thanks.
>>> dyn_client.resources.search()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/src/app/env/lib/python3.6/site-packages/kubernetes/dynamic/resource.py", line 75, in __repr__
return '<{}({}/{})>'.format(self.__class__.__name__, self.group_version, self.name)
File "/usr/src/app/env/lib/python3.6/site-packages/kubernetes/dynamic/resource.py", line 222, in __getattr__
if self.base_resource():
File "/usr/src/app/env/lib/python3.6/site-packages/kubernetes/dynamic/resource.py", line 122, in base_resource
self.__base_resource = self.client.resources.get(group=self.group, api_version=self.api_version, kind=self.base_kind)
File "/usr/src/app/env/lib/python3.6/site-packages/kubernetes/dynamic/discovery.py", line 211, in get
raise ResourceNotFoundError('No matches found for {}'.format(kwargs))
kubernetes.dynamic.exceptions.ResourceNotFoundError: No matches found for {'group': 'template.openshift.io', 'api_version': 'v1', 'kind': 'Template'}
[root@deploy ~]# oc api-resources|grep Template
podtemplates v1 true PodTemplate
clusterworkflowtemplates clusterwftmpl,cwft argoproj.io/v1alpha1 false ClusterWorkflowTemplate
workflowtemplates wftmpl argoproj.io/v1alpha1 true WorkflowTemplate
brokertemplateinstances template.openshift.io/v1 false BrokerTemplateInstance
processedtemplates template.openshift.io/v1 true Template
templateinstances template.openshift.io/v1 true TemplateInstance
templates template.openshift.io/v1 true Template
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting
/reopen
.
Mark the issue as fresh by commenting/remove-lifecycle rotten
.
Exclude this issue from closing again by commenting/lifecycle frozen
./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.