Мне нужно уменьшить количество повторов для недоступного / удаленного кластера kubernetes с использованием kubernetes-client-python, в настоящее время по умолчанию оно равно 3.
WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000000096E3860>: Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',)': /api/v1/pods
WARNING Retrying (Retry(total=1,....... /api/v1/pods
WARNING Retrying (Retry(total=0,....... /api/v1/pods
После 3 повторных попыток возникает исключение.
Есть ли способ уменьшить количество.
Пример кода
from kubernetes import client, config
config.load_kube_config(config_file='location-for-kube-config')
v1 = client.CoreV1Api()
ret = v1.list_pod_for_all_namespaces()
for i in ret.items:
print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name))