mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-03 20:40:26 -05:00
Merge pull request #136715 from guettli/set-getProbeTimeoutSeconds-to-3
e2e tests netpol: Set getProbeTimeoutSeconds to 3
This commit is contained in:
commit
13c031ffc8
1 changed files with 8 additions and 6 deletions
|
|
@ -321,13 +321,15 @@ func (k *kubeManager) getNamespace(ctx context.Context, ns string) (*v1.Namespac
|
|||
return selectedNameSpace, nil
|
||||
}
|
||||
|
||||
// getProbeTimeoutSeconds returns a timeout for how long the probe should work before failing a check, and takes windows heuristics into account, where requests can take longer sometimes.
|
||||
// getProbeTimeoutSeconds returns a timeout for how long the probe should work before failing a
|
||||
// check. The 3-second timeout not only ensures probe reliability across different platforms,
|
||||
// but also serves as an assertion on the non-functional requirement that the dataplane must
|
||||
// program network policies within an acceptable latency. This is especially critical for
|
||||
// network policy features where slow dataplane programming could impact connectivity and security.
|
||||
// The 3-second threshold was determined through empirical evidence as the maximum acceptable
|
||||
// latency for network policy enforcement.
|
||||
func getProbeTimeoutSeconds() int {
|
||||
timeoutSeconds := 1
|
||||
if framework.NodeOSDistroIs("windows") {
|
||||
timeoutSeconds = 3
|
||||
}
|
||||
return timeoutSeconds
|
||||
return 3
|
||||
}
|
||||
|
||||
// getWorkers returns the number of workers suggested to run when testing.
|
||||
|
|
|
|||
Loading…
Reference in a new issue