Commit Graph

26 Commits

Author SHA1 Message Date
Hao Ruan f695e2298f replace spew methods with dump methods
Kubernetes-commit: c4e1b01416ec05e6a520a181d4ce3b4333adb4e4
2023-04-13 09:41:07 +08: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
HaoJie Liu 4c5e4623d3 cleanup: use append other than for loop
Signed-off-by: HaoJie Liu <liuhaojie@beyondcent.com>

Kubernetes-commit: 29b5cd04bd2c7e2676687d3b613c9b065b128e54
2022-07-21 15:29:30 +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
Antonio Ojea 38c6ad936b run hack/update-netparse-cve.sh
Kubernetes-commit: 0cd75e8fec62a2531637e80bb950ac9983cac1b0
2021-08-20 01:16:14 +02: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
Monis Khan b37d21cc60 dynamic certs: pass valid object to event recorder
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 2cd6abece45bc62121097ce7cbe7f0d14b9be5e0
2020-03-04 09:54:27 -05:00
Monis Khan dd3ae9c175 dynamic certs: use correct name with event recorder
Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 3bc918e48427720938c731a6b26e9474b4819716
2020-03-03 18:40:34 -05:00
Monis Khan 091c53ac7a dynamic certs: do not copy mutex via shallow copy of tls.Config
go vet error:

call of dynamiccertificates.NewDynamicServingCertificateController
copies lock value: crypto/tls.Config contains sync.Once contains
sync.Mutex

Signed-off-by: Monis Khan <mok@vmware.com>

Kubernetes-commit: 86a5993007e3c781749a5099b540307f65a4f377
2020-03-03 14:58:43 -05: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 2e81ed6ee9 allow an SNI cert to be used to respond for a particular IP
Kubernetes-commit: 2c8639deb70c5934109022372caa32ca029db473
2019-11-14 16:08:11 -05:00
David Eads fe6638e697 prevent blocking wait in cert reloading
Kubernetes-commit: c14280e8d399b0db512989cfc33f8b1344d41f91
2019-12-18 08:41:57 -05:00
David Eads 0de0bb0422 dynamic reload cluster authentication info for aggregated API servers
Kubernetes-commit: 3aede35b3b042e8a626e8fb9e1e181e73cd29d0a
2019-11-04 13:46:28 -05:00
David Eads 79c6550889 allow individual ca bundles to be empty in union
Kubernetes-commit: 758f2ce44f82d68a1a67765823179c3f743e199d
2019-11-12 12:44:53 -05:00
David Eads 80b16c1ce7 allow a verifyoptionsfunc to indicate that no certpool is available
Kubernetes-commit: c672affad176c22da66c7ac17cc8805f08533ce9
2019-11-06 10:38:45 -05:00
Jack Kleeman c4dfb52a33 Dynamic SNI certificates
Reload SNI 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: d9adf535f35051be1d79d1309c72762939593d7c
2019-10-24 17:38:21 +01: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
David Eads 84d21cfff4 wire up a means to dynamically reload ca bundles for kube-apiserver
Kubernetes-commit: 6beb96261e29754f2b7d0e44829eb6d15422cebf
2019-10-07 14:06:42 -04:00
David Eads f0a6fac13c add dynamic cabundle from file
Kubernetes-commit: b0c272e1fb6782ca0b755294c6f9046995769553
2019-10-07 12:58:15 -04:00
Jack Kleeman 40fefa1b37 Plumb dynamic SNI certificates
We create and use a dynamic certificate provider for the SNI serving
certificates. Currently we only use static serving certificate
providers, so the files are not reloaded, but we should be able to move
to a provider that is able to reload later on.

Kubernetes-commit: 84bc6b151d0726db0c737443874577f044e0e9c8
2019-10-08 19:03:56 +01:00
Jack Kleeman 8da4640a3d Plumb dynamic serving certificates
We create and use a dynamic certificate provider for the main apiserver
serving certificates: SNI will be handled separately later. Currently we
only use static serving certificate providers, so the files are not
reloaded, but we should be able to move to a provider that is able to
reload later on.

Kubernetes-commit: 6f89f1027488aeba4af0786988c2fd2ace9a6f1d
2019-10-07 18:49:24 +01:00
David Eads 695d42bf49 wire dynamic tlsconfig up to apiserver
Kubernetes-commit: abddbd87cdcf69053e9fc6e752ade7d92c6b9fd7
2019-10-04 08:37:26 -04:00