Merge pull request #2095 from dbasunag/master

fix split call to handle apis of the format a/b/c
This commit is contained in:
Kubernetes Prow Robot 2023-07-31 11:00:38 -07:00 committed by GitHub
commit 76ec6f5ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,7 @@ class Discoverer(object):
resources_raw = list(filter(lambda resource: '/' not in resource['name'], resources_response))
subresources_raw = list(filter(lambda resource: '/' in resource['name'], resources_response))
for subresource in subresources_raw:
resource, name = subresource['name'].split('/')
resource, name = subresource['name'].split('/', 1)
if not subresources.get(resource):
subresources[resource] = {}
subresources[resource][name] = subresource