diff --git a/test/framework/envs/kubernetes/env.go b/test/framework/envs/kubernetes/env.go index c57194abc377..a00aa97c3ac3 100644 --- a/test/framework/envs/kubernetes/env.go +++ b/test/framework/envs/kubernetes/env.go @@ -22,6 +22,11 @@ func SetupAndGetState() []byte { )).To(Succeed()) kumaOptions := append([]framework.KumaDeploymentOption{ + // Occasionally CP will lose a leader in the E2E test just because of this deadline, + // which does not make sense in such controlled environment (one k3d node, one instance of the CP). + // 100s and 80s are values that we also use in mesh-perf when we put a lot of pressure on the CP. + framework.WithEnv("KUMA_RUNTIME_KUBERNETES_LEADER_ELECTION_LEASE_DURATION", "100s"), + framework.WithEnv("KUMA_RUNTIME_KUBERNETES_LEADER_ELECTION_RENEW_DEADLINE", "80s"), framework.WithCtlOpts(map[string]string{ "--experimental-gatewayapi": "true", }), diff --git a/test/framework/envs/multizone/env.go b/test/framework/envs/multizone/env.go index ad2ac90cd9de..30bdbc204652 100644 --- a/test/framework/envs/multizone/env.go +++ b/test/framework/envs/multizone/env.go @@ -66,6 +66,11 @@ func SetupAndGetState() []byte { kubeZone1Options := append( []framework.KumaDeploymentOption{ + // Occasionally CP will lose a leader in the E2E test just because of this deadline, + // which does not make sense in such controlled environment (one k3d node, one instance of the CP). + // 100s and 80s are values that we also use in mesh-perf when we put a lot of pressure on the CP. + WithEnv("KUMA_RUNTIME_KUBERNETES_LEADER_ELECTION_LEASE_DURATION", "100s"), + WithEnv("KUMA_RUNTIME_KUBERNETES_LEADER_ELECTION_RENEW_DEADLINE", "80s"), WithEnv("KUMA_STORE_UNSAFE_DELETE", "true"), WithEnv("KUMA_MULTIZONE_ZONE_KDS_NACK_BACKOFF", "1s"), WithIngress(), @@ -93,6 +98,11 @@ func SetupAndGetState() []byte { kubeZone2Options := append( []framework.KumaDeploymentOption{ + // Occasionally CP will lose a leader in the E2E test just because of this deadline, + // which does not make sense in such controlled environment (one k3d node, one instance of the CP). + // 100s and 80s are values that we also use in mesh-perf when we put a lot of pressure on the CP. + WithEnv("KUMA_RUNTIME_KUBERNETES_LEADER_ELECTION_LEASE_DURATION", "100s"), + WithEnv("KUMA_RUNTIME_KUBERNETES_LEADER_ELECTION_RENEW_DEADLINE", "80s"), WithEnv("KUMA_MULTIZONE_ZONE_KDS_NACK_BACKOFF", "1s"), WithIngress(), WithIngressEnvoyAdminTunnel(),