Skip to content

Commit 1301eaa

Browse files
ppapapetrou76nitishfytodaywasawesome
authored
feat: use different env variable to control server side K8s API call timeout (argoproj#25271)
Signed-off-by: Patroklos Papapetrou <ppapapetrou76@gmail.com> Signed-off-by: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com> Co-authored-by: Nitish Kumar <justnitish06@gmail.com> Co-authored-by: Dan Garfield <dan.garfield@octopus.com>
1 parent 706e469 commit 1301eaa

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/operator-manual/upgrading/3.2-3.3.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ If any existing manifests become corrupted, please follow the[release notes](htt
1818

1919
The Settings API now returns less information when accessed anonymously.
2020
It no longer returns the `resourceOverrides` field which is considered sensitive information.
21+
22+
### New ENV Variable to control K8s Server Side Timeout of API Requests
23+
24+
The new environment variable `ARGOCD_K8S_SERVER_SIDE_TIMEOUT` can be used to control the K8s server side timeout of API requests.
25+
In 3.2 and before this change, the K8s server side timeout was controlled by `ARGOCD_K8S_TCP_TIMEOUT`
26+
which is also used to control the TCP timeout when communicating with the K8s API server.
27+
From now onwards, the Kubernetes server-side timeout is controlled by a separate environment variable.

pkg/apis/application/v1alpha1/cluster_constants.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ const (
2525
// EnvK8sTCPTimeout is the duration for TCP timeouts when communicating with K8s API servers
2626
EnvK8sTCPTimeout = "ARGOCD_K8S_TCP_TIMEOUT"
2727

28-
// EnvK8sTCPKeepalive is the interval for TCP keep alive probes to be sent when communicating with K8s API servers
28+
// EnvK8sTCPKeepAlive is the interval for TCP keep alive probes to be sent when communicating with K8s API servers
2929
EnvK8sTCPKeepAlive = "ARGOCD_K8S_TCP_KEEPALIVE"
3030

3131
// EnvK8sTLSHandshakeTimeout is the duration for TLS handshake timeouts when establishing connections to K8s API servers
3232
EnvK8sTLSHandshakeTimeout = "ARGOCD_K8S_TLS_HANDSHAKE_TIMEOUT"
3333

3434
// EnvK8sTCPIdleConnTimeout is the duration when idle TCP connection to the K8s API servers should timeout
3535
EnvK8sTCPIdleConnTimeout = "ARGOCD_K8S_TCP_IDLE_TIMEOUT"
36+
37+
// EnvK8sServerSideTimeout is the duration for the server side timeout for each API request
38+
EnvK8sServerSideTimeout = "ARGOCD_K8S_SERVER_SIDE_TIMEOUT"
3639
)
3740

3841
// Configuration variables associated with the Cluster API
@@ -60,5 +63,5 @@ var (
6063
K8sTCPIdleConnTimeout = env.ParseDurationFromEnv(EnvK8sTCPIdleConnTimeout, 5*time.Minute, 0, math.MaxInt32*time.Second)
6164

6265
// K8sServerSideTimeout defines which server side timeout to send with each API request
63-
K8sServerSideTimeout = env.ParseDurationFromEnv(EnvK8sTCPTimeout, 0, 0, math.MaxInt32*time.Second)
66+
K8sServerSideTimeout = env.ParseDurationFromEnv(EnvK8sServerSideTimeout, 0, 0, math.MaxInt32*time.Second)
6467
)

0 commit comments

Comments
 (0)