-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Cannot pass configuration for the API query to reach specific object. #1353
Comments
/assign @roycaihw |
I am hitting this exact issue when creating HPA objects. The initial status is |
I think you're hitting the breaking change. Could you try using |
I have tried setting a new default Configuration with the attr It seems like HPA objects are the only one that raises this error, and it is only seems to happen on initial create. Not sure if that is helpful |
The HPA creation failing the validation must be another occurrence of kubernetes-client/gen#52. The condition field is marked as "required", but the apiserver is omitting it when responding. This can be fixed in upstream openapi spec. Please see kubernetes-client/gen#52 (comment) for an example fix. |
I think this is a bug in the upstream client generator and was fixed in OpenAPITools/openapi-generator#8500. We need to bump the client generator version to include the fix. |
I think this looks like the exact fix I was hoping for! For the time being, I will catch the |
Filed #1421 to track bumping the version in the next prerelease. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
What happened (please include outputs or screenshots):
I have noticed, that every model class can accept
local_vars_configuration
parameter during creation, otherwise it create default one, i.e.:This lead to the title of this bug, where there is no way (or I cannot find one) for configuring an api call, to, for instance, turn off client side validation. In other words, there is no way to actually query K8s API with client side validation turned off.
I'm experimenting with the Kubernetes feature gate, and turned off selfLink propagation, which leads to an issue with the kubernetes itself, although IMO it just uncover how python client was designed.
My minimal example:
which just fetch the list of pods, and ends up wit the traceback:
What you expected to happen:
I'd expect, that configuration passed to the API object will be used in models as well. Otherwise there is no sense at all to configure anything connected with models itself, since default configuration would be used (not even preconfigured one, so
set_default
/get_default_copy
methods of Configuration class could be used).How to reproduce it (as minimally and precisely as possible):
--feature-gates=RemoveSelfLink=true
Anything else we need to know?:
Environment:
kubectl version
): 1.19.6python --version
) 3.6.9pip list | grep kubernetes
) 12.0.1The text was updated successfully, but these errors were encountered: