apiserver/pkg/server/options
Clayton Coleman 03e6089ce8 wait: Use a context implementation for ContextForChannel
ContextForChannel uses a goroutine to transform a channel close to
a context cancel. However, this exposes a synchronization issue if
we want to unify the underlying implementation between contextless
and with context - a ConditionFunc that closes the channel today
expects the behavior that no subsequent conditions will be invoked
(we have a test in wait_test.go TestUntilReturnsImmediately that
verifies this expectation). We can't unify the implementation
without ensuring this property holds.

To do that this commit changes from the goroutine propagation to
implementing context.Context and using stopCh as the Done(). We
then implement Err() by returning context.Canceled and stub the
other methods. Since our context cannot be explicitly cancelled
by users, we cease to return the cancelFn and callers that need
that behavior must wrap the context as normal.

This should be invisible to clients - they would already observe
the same behavior from the context, and the existing error
behavior of Poll* is preserved (which ignores ctx.Err()).

As a side effect, one less goroutine is created making it more
efficient.

Kubernetes-commit: 95051a63b323081daf8a3fe55a252eb79f0053aa
2023-01-17 15:01:02 -05:00
..
encryptionconfig apiserver/kmsv2: mv Service interface into kmsv2 2023-01-09 14:36:06 +01:00
testdata kms: add wiring to support automatic encryption config reload 2022-11-02 01:08:42 -04:00
OWNERS Cleanup OWNERS files (No Activity in the last year) 2021-12-10 15:18:50 -05:00
admission.go Rename admission cel package to validatingadmissionpolicy 2022-11-08 14:18:26 +00:00
admission_test.go Integrate cel admission with API. 2022-11-07 21:38:55 +00:00
api_enablement.go fix typo `registry` 2021-08-08 18:37:16 +08:00
api_enablement_test.go fix typo `registry` 2021-08-08 18:37:16 +08:00
audit.go Ensure the dir of --audit-log-path exists 2022-06-27 17:21:02 +03:00
audit_test.go Ensure the dir of --audit-log-path exists 2022-06-27 17:21:02 +03:00
authentication.go Add DisableAnonymous to DelegatingAuthenticationOptions 2022-09-01 11:58:51 -04:00
authentication_dynamic_request_header.go API Server Changes 2022-03-07 09:20:45 -05:00
authentication_test.go wire up a means to dynamically reload ca bundles for kube-apiserver 2019-10-07 14:06:42 -04:00
authorization.go Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 17:31:05 -05:00
coreapi.go kubelet tracing 2021-10-10 09:17:27 -04:00
deprecated_insecure_serving.go remove DeprecatedInsecureServingOptionsWithLoopback 2022-09-11 21:22:18 +08:00
doc.go move apiserver options 2017-02-02 09:36:48 -05:00
egress_selector.go fix all keps links 404 for kep folder migration 2021-01-14 14:03:21 +08:00
etcd.go wait: Use a context implementation for ContextForChannel 2023-01-17 15:01:02 -05:00
etcd_test.go feat: implements kms encryption config hot reload 2022-11-07 22:15:56 +00:00
feature.go Allow profiling information to be served on Unix-Domain Socket 2022-11-29 11:07:15 -08:00
recommended.go feat: implements kms encryption config hot reload 2022-11-07 22:15:56 +00:00
server_run_options.go clean up master-service-namespace 2022-12-13 18:13:16 +08:00
server_run_options_test.go cleanup(apiserver): delete the --max-resource-write-bytes & --json-patch-max-copy-bytes description. 2021-12-08 17:12:37 +08:00
serving.go run hack/update-netparse-cve.sh 2021-08-20 01:16:14 +02:00
serving_test.go run hack/update-netparse-cve.sh 2021-08-20 01:16:14 +02:00
serving_unix.go generated: Run hack/update-gofmt.sh 2021-08-12 17:13:11 -04:00
serving_unix_test.go generated: Run hack/update-gofmt.sh 2021-08-12 17:13:11 -04:00
serving_windows.go generated: Run hack/update-gofmt.sh 2021-08-12 17:13:11 -04:00
serving_with_loopback.go Switch the order of adding SNICert and creating LoopbackClientConfig 2021-04-22 23:17:39 +00:00
serving_with_loopback_test.go run hack/update-netparse-cve.sh 2021-08-20 01:16:14 +02:00
tracing.go Revert "Graduate API Server tracing to beta" 2022-11-09 22:37:28 -05:00
tracing_test.go kubelet tracing 2021-10-10 09:17:27 -04:00