-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection's util resource discovery fails when complex subresources present #659
Comments
Hi team, met the same issue in discovery.py
the name have two '/' in it.
only give two params to get value. it run into the same issue like
@dkasanic the workaround is adding
|
Hi,
It seems more logical to add this control, since the current code doesn't support more than two elements |
We are dealing with the same error but on other occasion. In our case we try to post a configmap which is only
And the full configmap is:
And the error:
We started seeing it only on a newer version of k8s. It started on 1.28. My guess is something changed in the returned value from k8s. |
…ces present #659) (#676) * fix(Collection's util resource discovery fails when complex subresources present #659) * fix(add changelog fragment) * update node image * Create discovery.yml * Update main.yml --------- Co-authored-by: Bastien Bosser <[email protected]> Co-authored-by: Bikouo Aubin <[email protected]>
…ces present #659) (#676) * fix(Collection's util resource discovery fails when complex subresources present #659) * fix(add changelog fragment) * update node image * Create discovery.yml * Update main.yml --------- Co-authored-by: Bastien Bosser <[email protected]> Co-authored-by: Bikouo Aubin <[email protected]> (cherry picked from commit 1955989)
…discovery fails when complex subresources present #659) (#687) * fix(Collection's util resource discovery fails when complex subresources present #659) (#676) * fix(Collection's util resource discovery fails when complex subresources present #659) * fix(add changelog fragment) * update node image * Create discovery.yml * Update main.yml --------- Co-authored-by: Bastien Bosser <[email protected]> Co-authored-by: Bikouo Aubin <[email protected]> (cherry picked from commit 1955989) * adding sanity ignore file * Remove refresh_ignore_files * Update ignore files content --------- Co-authored-by: bastienbosser <[email protected]> Co-authored-by: abikouo <[email protected]>
…e discovery fails when complex subresources present #659) (#688) * update node image * fix(Collection's util resource discovery fails when complex subresources present #659) * fix(add changelog fragment) * Create discovery.yml * Update main.yml * Backport PR659 * fix sanity issues --------- Co-authored-by: Bastien Bosser <[email protected]>
SUMMARY
Collection's util resource discovery fails on Python Value error due to subresources having multiple "/" in string.
Kubevirt introduces such subresources, take a look here: https://github.com/kubevirt/kubevirt/blob/main/pkg/virt-api/api.go#L638
However, discovery util in collections expects all subresources having only 1 "/" char in string, look here: https://github.com/ansible-collections/kubernetes.core/blob/main/plugins/module_utils/client/discovery.py#L116
ISSUE TYPE
COMPONENT NAME
plugins/module_utils/client/discover.py
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Kubernetes 1.28.3 with Calico CNI.
Kubevirt installed.
STEPS TO REPRODUCE
EXPECTED RESULTS
Task should return list of deployment objects present in kubevirt namespace.
ACTUAL RESULTS
Task fails on python Value error:
The text was updated successfully, but these errors were encountered: