kubernetes.client.Configuration.set_default is not working as expected
What happened (please include outputs or screenshots):
configuraa = client.Configuration()
configuraa.retries = 1
client.Configuration.set_default(configuraa)
Here, I am trying to override retries value from 3 to 1.
This is from the source code ->
But I found that , you are not receiving that parameter here ->
What you expected to happen:
Expected behaviour -> User should be able to override max retry times incase cluster is not reachable
How to reproduce it (as minimally and precisely as possible):
Try to reach any cluster which doesnt exist properly from the above code
Anything else we need to know?:
After a long time, this error is printed , Which takes literally a lot of time ! and get this error message
Environment:
- Kubernetes version (
kubectl version) : Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.14") , Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.9-gke.1092000" - OS (e.g., MacOS 10.13.6): linux/amd64
- Python version (
python --version) : Python 3.6.8 - Python client version (
pip list | grep kubernetes): kubernetes 26.1.0
Hi, here rest.py is the right code receiving the parameter retries.
/assign @showjason
Hi, here rest.py is the right code receiving the parameter
retries.
It is not working, as in even retries is not getting applied
Hi, here rest.py is the right code receiving the parameter
retries.It is not working, as in even retries is not getting applied
please try the following code:
from kubernetes import client, config
conf = client.Configuration()
conf.retries = 3
config.load_kube_config(client_configuration=conf)
client.Configuration.set_default(conf)
v1 = client.CoreV1Api()
resp = v1.read_namespaced_pod("<pod_name>", "<namespace>")
print(resp)
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
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 according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
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-sigs/prow repository.