caas-team / py-kube-downscaler

Scale down / "pause" Kubernetes workload (Deployments, StatefulSets, and/or HorizontalPodAutoscalers and CronJobs too !) during non-work hours.
GNU General Public License v3.0
34 stars 12 forks source link

Failed To Process Resource: Read Timed Out #105

Open samuel-esp opened 1 week ago

samuel-esp commented 1 week ago

Issue

In some circumstances that I still wasn't able to replicate, KubeDownscaler will timeout when processing a resources. This is most probably caused by a slow communication between the Pod and the Kubernetes API Server. This may happen because a network bottleneck or because the API Server itself is busy processing other requests

Problem to solve

Let the user adjust this KubeDownscaler timeout (inherited from PyKube library) using an argument

Proposal

Parametrize, inside scaler.py, the pykube constant pykube.http.DEFAULT_HTTP_TIMEOUT to a value that can be choosen by the user using an argument inside KubeDownscaler deployment

samuel-esp commented 1 week ago

The problem was first mentioned in issue #96. It firstly seemed a code regression but after further verifcations this option was ruled out