Commit Graph

21 Commits

Author SHA1 Message Date
Paco Xu 9388b76b21 add seperate health check/probe for multi etcd override servers
- grouping health checks for exclusion purposes & add exclude integration test

Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: 891e7fec6e17382389b01f590888375a29491afc
2025-01-26 15:05:59 +08:00
Siyuan Zhang 22612a3528 apiserver: Add API emulation versioning.
Co-authored-by: Siyuan Zhang <sizhang@google.com>
Co-authored-by: Joe Betz <jpbetz@google.com>
Co-authored-by: Alex Zielenski <zielenski@google.com>

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: 403301bfdf2c7312591077827abd2e72f445a53a
2024-01-19 16:07:00 -08:00
Marek Siarkowicz 74fb076497 Cleanup defer from SetFeatureGateDuringTest function call
Kubernetes-commit: 3ee81787685e47a7a5da22423c8ca4455577ecb3
2024-04-23 10:39:47 +02:00
chenk008 70fb342c48 Fix: StorageObjectCountTracker is nil, apf estimator got ObjectCountNotFoundErr
Kubernetes-commit: 4abc2b387b188d694e369e05c08effce9d23e7e7
2024-04-08 11:09:27 +08:00
Rita Zhang 26219aabef [KMSv2] promote KMSv2 and KMSv2KDF to GA
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

Kubernetes-commit: a9b1adbafc7fe52f669dc98aada21bc3e46cdce3
2023-10-24 09:50:45 -07:00
Ben Luddy a270d45ae5 Add validation for --storage-media-type option.
Kubernetes-commit: cf836309dc278d8d4f046e1580649179b1531143
2023-10-19 10:54:16 -04:00
Rita Zhang cdb2cea24a kms: remove livez check
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>

Kubernetes-commit: 7710128636a16c73045291d4729675339a7d57f7
2023-09-11 16:47:29 -07:00
Dr. Stefan Schimanski 8f40ac3bd1 k8s.io/apiserver: remove skewed completion from EtcdOptions
Kubernetes-commit: e9e4acb1dde69243a6e675e58833ae7936df9ce5
2023-06-02 20:25:31 +02:00
Dr. Stefan Schimanski 71c4af4092 k8s.io/apiserver: apply storage object count tracker implicitly
Kubernetes-commit: f351c6d1eccd196fb7a9ac89097b05690b03babb
2023-06-02 16:52:21 +02:00
Nilekh Chaudhari 25c1e9054d feat: implements kms encryption config hot reload
This change enables hot reload of encryption config file when api server
flag --encryption-provider-config-automatic-reload is set to true. This
allows the user to change the encryption config file without restarting
kube-apiserver. The change is detected by polling the file and is done
by using fsnotify watcher. When file is updated it's process to generate
new set of transformers and close the old ones.

Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>

Kubernetes-commit: 761b7822fca569d475f782b135ef433e5b014147
2022-11-07 22:15:56 +00:00
Monis Khan e137a3da77 kms: add wiring to support automatic encryption config reload
This change adds a flag --encryption-provider-config-automatic-reload
which will be used to drive automatic reloading of the encryption
config at runtime.  While this flag is set to true, or when KMS v2
plugins are used without KMS v1 plugins, the /healthz endpoints
associated with said plugins are collapsed into a single endpoint at
/healthz/kms-providers - in this state, it is not possible to
configure exclusions for specific KMS providers while including the
remaining ones - ex: using /readyz?exclude=kms-provider-1 to exclude
a particular KMS is not possible.  This single healthz check handles
checking  all configured KMS providers.  When reloading is enabled
but no KMS providers are configured, it is a no-op.

k8s.io/apiserver does not support dynamic addition and removal of
healthz checks at runtime.  Reloading will instead have a single
static healthz check and swap the underlying implementation at
runtime when a config change occurs.

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

Kubernetes-commit: 22e540bc48d9bf698c4f381ccb56ed57dea0dae2
2022-11-02 01:08:42 -04:00
Monis Khan 8d68e6f323 Load encryption config once
This change updates the API server code to load the encryption
config once at start up instead of multiple times.  Previously the
code would set up the storage transformers and the etcd healthz
checks in separate parse steps.  This is problematic for KMS v2 key
ID based staleness checks which need to be able to assert that the
API server has a single view into the KMS plugin's current key ID.

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

Kubernetes-commit: f507bc255382b2e2095351053bc17e74f7100d35
2022-08-29 17:25:48 -04:00
Maciej Wyrzuc cb0bb2af35 Add additional etcd check to readyz with 2 seconds timeout.
Kubernetes-commit: b42045a64fd07fb948660839b6c7c14440bee9df
2022-07-25 13:08:50 +00:00
Wojciech Tyczyński 0a7c4bcca1 Cleanup etcd healthcheck on shutdown
Kubernetes-commit: cb80082f666e0e5fe220df32e31a8face18e9393
2022-05-10 11:12:08 +02:00
Wenjia Zhang e518fe04f6 Resolve uncompatibility from update: etcd CAFile -> TrustedCAFIle
Kubernetes-commit: 9ead9373f350c7ad438257a9e8b8977a67b900eb
2019-10-23 11:15:43 -07:00
immutablet 5faffb9123 Allow kube-apiserver to test the status of kms-plugin.
Kubernetes-commit: 05fdbb201ffbaff4e92f0899f9e2ca038febb88d
2019-05-30 11:15:35 -07:00
Dr. Stefan Schimanski 7d47897b55 apiserver: separate transport setting from storagebackend.Config
Kubernetes-commit: 7b242533a217bd809e2c846c3e3fadf7bf6edee8
2018-09-12 10:59:01 +02:00
Jordan Liggitt c7c9a358c2 etcd2 code cleanup, remove deserialization cache
Kubernetes-commit: c8db31b84adc40aa875917fbca27b2a787902088
2018-10-15 22:17:44 -04:00
Jordan Liggitt bd604a62aa Remove deprecated --etcd-quorum-read flag
Kubernetes-commit: cff79c542130831f4a212099974570244a0c9586
2018-10-08 11:04:28 -04:00
Christoph Blecker 92e87e143a Update gofmt for go1.11
Kubernetes-commit: 97b2992dc191a357e2167eff5035ce26237a4799
2018-10-05 12:59:38 -07:00
hangaoshuai c872082b0a add unit test func TestEtcdOptionsValidate and TestParseWatchCacheSizes
Kubernetes-commit: 67a1d53bd74265637718b67c80f48a26b6e653cf
2018-08-22 10:17:26 +08:00