Commit Graph

12 Commits

Author SHA1 Message Date
Alvaro Aleman da88853b95 Use the generic/typed workqueue throughout
This change makes us use the generic workqueue throughout the project in
order to improve type safety and readability of the code.

Kubernetes-commit: 6d0ac8c561a7ac66c21e4ee7bd1976c2ecedbf32
2024-04-28 18:26:18 +02:00
Stephen Kitt 7fb4ad7511 api-machinery: stop using deprecated io/ioutil
This replaces deprecated ioutil functions as follows:

* ioutil.ReadAll -> io.ReadAll
* ioutil.ReadFile -> os.ReadFile
* ioutil.TempDir -> os.MkdirTemp
* ioutil.TempFile -> os.CreateTemp
* ioutil.WriteFile -> os.WriteFile

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: b60a3a58df2791ae67764f6325be31aea5eca5a0
2023-05-02 15:08:18 +02:00
Paco Xu c23bbb6aae fsnotify: use event.Has instead of "event.Op&h == h"
Kubernetes-commit: 2ce7a8116902a47c0b859dff1f546e194d468064
2022-10-13 13:42:11 +08:00
Ravi Gudimetla 1ee261d219 API Server Changes
This commit includes all the changes needed for APIServer. Instead of modifying the existing signatures for the methods which either generate or return stopChannel, we generate a context from the channel and use the generated context to be passed to the controllers which are started in APIServer. This ensures we don't have to touch APIServer dependencies.

Kubernetes-commit: 8b84a793b39fed2a62af0876b2eda461a68008c9
2022-03-07 09:20:45 -05:00
Quan Tian 0737519ac6 Improve dynamic cert file change detection
DynamicFileCAContent and DynamicCertKeyPairContent used periodical job
to check whether the file content has changed, leading to 1 minute of
delay in worst case. This patch improves it by leveraging fsnotify
watcher. The content change will be reflected immediately.

Kubernetes-commit: 3cfe3d048ff37c1c6994d131ed8557f3c8bddc8a
2021-08-03 21:28:01 +08:00
sanwishe 1b6c1bf2dd Structured Logging migration: for package staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates
Signed-off-by: sanwishe <jiang.mingzhi35@zte.com.cn>

Kubernetes-commit: 6eb645088c41f5f9309ad27a3fe80ccebd18460d
2021-05-10 20:08:14 +08:00
Mike Danese a6a121887a force implementors of dyanmiccertificates providers to think about notify
Right now, `_, ok := provider.(Notifier); !ok` can mean one of two
things:

1. The provider does not support notification because the provided
   content is static.
2. The implementor of the provider hasn't gotten around to implementing
   Notifier yet.

These have very different implications. We should not force consumers of
these interfaces to have to figure out the static of Notifier across
sometimes numerous different implementations. Instead, we should force
implementors to implement Notifier, even if it's a noop.

Change-Id: Ie7a26697a9a17790bfaa58d67045663bcc71e3cb

Kubernetes-commit: 9b7d654a08d694d20226609f7075b112fb18639b
2021-04-09 16:59:17 -07:00
Davanum Srinivas 5879417a28 switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Lukasz Szaszkiewicz 3ae793e2b7 cleans up dynamiccertificates package
Kubernetes-commit: 413960e49bea4b5558ea4dda3d18137eceaf7f16
2020-03-03 14:38:18 +01:00
David Eads 78efdd9c66 rename dynamic cert loading to be more accurate
Kubernetes-commit: 5c2d2c5ef1ab08eb4dfaec0947e1ce252119c85d
2020-01-17 15:50:26 -05:00
David Eads fe6638e697 prevent blocking wait in cert reloading
Kubernetes-commit: c14280e8d399b0db512989cfc33f8b1344d41f91
2019-12-18 08:41:57 -05:00
Jack Kleeman 51b8ce994d Dynamic serving certificate
Reload certificate cert and key file from disk every minute and notify
the dynamic certificate controller when they change, allowing serving
tls config to be updated.

Kubernetes-commit: 3f5fbfbfac281f40c11de2f57d58cc332affc37b
2019-10-22 19:10:40 +01:00