diff --git a/CHANGELOG.md b/CHANGELOG.md index 54afb43a..ade493e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## main / unreleased * [ENHANCEMENT] New parameter log.format allows to set logging format to logfmt (default) or json (new). #184 +* [ENHANCEMENT] Add a 5 minute timeout to requests to Pods and to the Kubernetes control plane. ## v0.21.0 diff --git a/cmd/rollout-operator/main.go b/cmd/rollout-operator/main.go index 0d1d6d1a..8b3a8e39 100644 --- a/cmd/rollout-operator/main.go +++ b/cmd/rollout-operator/main.go @@ -276,6 +276,10 @@ func buildKubeConfig(apiURL, cfgFile string) (*rest.Config, error) { if err != nil { return nil, err } + // Set a generous timeout. + // We use this client for various HTTP operations against the k8s API and against the StatefulSets. + // We want to not be stuck waiting forever on a TCP timeout, but also not interrupt any process the StatefulSets might eb doing. + config.Timeout = 5 * time.Minute return config, nil }