ContainerImage.Pinniped/test/integration
Monis Khan c71ffdcd1e
leader election: use better duration defaults
OpenShift has good defaults for these duration fields that we can
use instead of coming up with them ourselves:

e14e06ba8d/pkg/config/leaderelection/leaderelection.go (L87-L109)

Copied here for easy future reference:

// We want to be able to tolerate 60s of kube-apiserver disruption without causing pod restarts.
// We want the graceful lease re-acquisition fairly quick to avoid waits on new deployments and other rollouts.
// We want a single set of guidance for nearly every lease in openshift.  If you're special, we'll let you know.
// 1. clock skew tolerance is leaseDuration-renewDeadline == 30s
// 2. kube-apiserver downtime tolerance is == 78s
//      lastRetry=floor(renewDeadline/retryPeriod)*retryPeriod == 104
//      downtimeTolerance = lastRetry-retryPeriod == 78s
// 3. worst non-graceful lease acquisition is leaseDuration+retryPeriod == 163s
// 4. worst graceful lease acquisition is retryPeriod == 26s
if ret.LeaseDuration.Duration == 0 {
	ret.LeaseDuration.Duration = 137 * time.Second
}

if ret.RenewDeadline.Duration == 0 {
	// this gives 107/26=4 retries and allows for 137-107=30 seconds of clock skew
	// if the kube-apiserver is unavailable for 60s starting just before t=26 (the first renew),
	// then we will retry on 26s intervals until t=104 (kube-apiserver came back up at 86), and there will
	// be 33 seconds of extra time before the lease is lost.
	ret.RenewDeadline.Duration = 107 * time.Second
}
if ret.RetryPeriod.Duration == 0 {
	ret.RetryPeriod.Duration = 26 * time.Second
}

Signed-off-by: Monis Khan <mok@vmware.com>
2021-08-24 16:21:53 -04:00
..
category_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
cli_test.go Fix TestCLILoginOIDC when running directly against Okta. 2021-07-09 16:29:42 -05:00
concierge_api_serving_certs_test.go Make TestAPIServingCertificateAutoCreationAndRotation less flaky. 2021-07-09 11:29:02 -05:00
concierge_availability_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_client_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_credentialissuer_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_credentialrequest_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
concierge_impersonation_proxy_test.go Add leader election middleware 2021-08-20 12:18:25 -04:00
concierge_kubecertagent_test.go Relax the timeout for TestLegacyPodCleaner a bit. 2021-07-28 13:08:57 -05:00
concierge_kubectl_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
e2e_test.go Update expected error message in e2e integration test 2021-08-16 15:40:34 -07:00
formposthtml_test.go Extend TestE2EFullIntegration to test manual OIDC flow. 2021-07-09 12:08:45 -05:00
kube_api_discovery_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
kubeclient_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
ldap_client_test.go Run the LDAP client's integration tests only on Kind 2021-07-08 11:10:53 -07:00
leaderelection_test.go leader election: use better duration defaults 2021-08-24 16:21:53 -04:00
rbac_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
supervisor_discovery_test.go Add "response_modes_supported" to Supervisor discovery response. 2021-07-09 12:08:43 -05:00
supervisor_healthz_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
supervisor_login_test.go Optionally allow OIDC password grant for CLI-based login experience 2021-08-12 10:45:39 -07:00
supervisor_secrets_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
supervisor_storage_garbage_collection_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
supervisor_storage_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
supervisor_upstream_test.go Fix bad test package name 2021-06-22 11:23:19 -04:00
whoami_test.go test/integration: ignore restarts associated with test pods 2021-08-17 12:57:41 -04:00