Commit Graph

55 Commits

Author SHA1 Message Date
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 2f9a2acafb Fix stop signal to drained signal in genericapiserver config
Kubernetes-commit: b56491e6cfe216adc245abfa099757e779403982
2022-05-18 18:55:45 +02:00
Wojciech Tyczyński 0a7c4bcca1 Cleanup etcd healthcheck on shutdown
Kubernetes-commit: cb80082f666e0e5fe220df32e31a8face18e9393
2022-05-10 11:12:08 +02:00
Mike Spreitzer 010d347f35 Update flag descriptions for watch cache
Kubernetes-commit: 2ea3afe425836253202dd36239d8b54149ccb53c
2022-03-31 10:55:51 -04:00
Mike Spreitzer 60facb736d Log whether watch cache is used for particular resources
Kubernetes-commit: ce3bf7ae944d4d9255537617b340d5da4efc288f
2022-03-30 23:16:02 -04:00
ialidzhikov 38f395ca57 apiserver: Remove the deprecated `--deserialization-cache-size` flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

Kubernetes-commit: ee2530ffd4db0cdc8384f7d4acb014e79bb224e9
2022-03-02 15:33:21 +02:00
ialidzhikov aa165d392e apiserver: Remove the deprecated `--experimental-encryption-provider-config` flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

Kubernetes-commit: 244bf1bd69c962041ba5cabc3c9e92f3f94a3ba4
2022-03-01 19:21:18 +02:00
Mike Spreitzer b225af44fe Introduce storagebackend.ConfigForResource
This is a Config specialized for a GroupResource.
It will support generating new resource-specific metrics.

Kubernetes-commit: 85bcd243aa3c8769a5904a1aea44ce704f5e7174
2021-08-29 01:06:12 -04:00
Abu Kashem feb4eefe1c apiserver: add callback to get notified of object count
Kubernetes-commit: 2c60feffbee690af4632d068158e640abe10f678
2021-07-14 16:44:34 -04:00
Ryan Phillips 7afffd8ef3 Revert "apiserver: add callback to get notified of object count"
Kubernetes-commit: d95b14e1abfb5ec87248e5dd826b89d0c738af42
2021-07-08 13:56:39 -05:00
Abu Kashem d929410e13 apiserver: add callback to get notified of object count
Kubernetes-commit: 1002b0d163dd948334f10b0e25d0e91d253791e8
2021-06-18 10:44:07 -04:00
yue9944882 d3f04fd7c9 support storage encryption for aa server
Kubernetes-commit: dcf4821cd4c798aa08e6b31c5474717c7164945a
2021-02-18 19:10:50 +08:00
Maurizio Drocco 353b45e333 Update etcd.go
Kubernetes-commit: f6ac24bfd86d9dfce6a8ff0d611b4fdabc7bc504
2020-04-13 13:29:18 -04:00
Maurizio Drocco 68a0c4dbb1 Update etcd.go
Kubernetes-commit: 368e976113ca035854083212275a0c39373f152e
2020-04-10 13:21:59 -04:00
Maurizio Drocco 05f1caa35b Update etcd.go
Kubernetes-commit: 5c3d6a26a11875a8305832fa681cc5929d159eb2
2020-04-10 11:12:26 -04:00
Maurizio Drocco 442d715210 added note on --etcd-servers-overrides
Added a note on etcd-servers-overrides option, to clarify CRDs are not supported (yet).

Kubernetes-commit: 4a71f84a30107abde63b66424c2f8d55acde7ffe
2020-04-10 10:14:50 -04:00
Ling Samuel bd7da186cc apiserver add metric etcd_lease_object_counts
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>

Kubernetes-commit: 7e9fe39cd7c3ee67fcc29e6ca0836917c5a4e9e1
2020-12-07 10:45:44 +08:00
Ling Samuel f673ce24f7 apiserver add --lease-reuse-duration-seconds to config lease reuse duration
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>

Kubernetes-commit: c99567005db15d220f2b792e98af735c5aa24f6e
2020-12-02 17:35:10 +08:00
Patrik Cyvoct ddd0b07a5a Allow configuration of etcd healthcheck timeout
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>

Kubernetes-commit: 2e430ba622817b534642fd93098f87ea7f983aee
2020-07-20 09:22:13 +02:00
wojtekt db5fe3e7d4 Remove heuristic watchcache sizes
Kubernetes-commit: 5ceb53987be7fe9ea6b43ba568f6f6f500ca2488
2020-06-05 14:37:01 +02:00
jingyih 9303178e27 Add a metric exposing etcd database size
Kubernetes-commit: 922ec728de9248657f026eb6cfb8fdaeb11049ac
2020-03-16 07:55:38 -07:00
Wenjia Zhang e518fe04f6 Resolve uncompatibility from update: etcd CAFile -> TrustedCAFIle
Kubernetes-commit: 9ead9373f350c7ad438257a9e8b8977a67b900eb
2019-10-23 11:15:43 -07:00
Han Kang 26cf2f2052 expose and use an AddHealthChecks method directly on config
Kubernetes-commit: 97b58ece4a2ad1a366a9cf7deea9581373931238
2019-09-13 17:04:00 -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
Yassine TIJANI 72bd8c7a64 use cache size to signal undecorated storage
Kubernetes-commit: 8261d3d9a63f0972453f6503b62299a96ecee657
2019-02-20 22:15:24 +01:00
Dr. Stefan Schimanski 7d47897b55 apiserver: separate transport setting from storagebackend.Config
Kubernetes-commit: 7b242533a217bd809e2c846c3e3fadf7bf6edee8
2018-09-12 10:59:01 +02:00
Mike Spreitzer ee7fb67d6e Clarified syntax doc on --watch-cache-sizes
Noted that group must be omitted for resources of apiVersion v1 (the
legacy core API) and included for others.

Fixes #65393

Kubernetes-commit: fc20359fed5e3d0e89a60653b9b0d638d4d757d8
2018-11-12 14:45:45 -05:00
Sergei Orlov e485f8578d kubeapiserver: rename '--experimental-encryption-provider-config' to '--encryption-provider-config'.
This change renames the '--experimental-encryption-provider-config'
flag to '--encryption-provider-config'. The old flag is accepted but
generates a warning.

In 1.14, we will drop support for '--experimental-encryption-provider-config'
entirely.

Co-authored-by: Stanislav Laznicka <slaznick@redhat.com>

Kubernetes-commit: 21c1bb883081b13244002271bccc9cf119d4db4f
2018-03-23 14:16:04 +03: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
Jordan Liggitt 3b6fc08803 Remove etcd2 storage backend
Kubernetes-commit: 85ae79500fba7d6e51292b12daff829027b59872
2018-10-01 16:48:14 -04:00
David Eads 34ff0933dd expose generic storage factory primitives
Kubernetes-commit: 81b9213ac2cc7744b8a62ac42b269b97c1d17b5a
2018-08-27 10:45:52 -04:00
Jordan Liggitt 8d6d8aa36e Use actual etcd client for /healthz/etcd checks
Kubernetes-commit: b39cd00982c1696d8ae8afc99931919894044ee2
2018-06-12 14:33:48 -04:00
hzxuzhonghu 422369e23b move EtcdServersOverrides to EtcdOptions flags validate
Kubernetes-commit: f380ac8cec8061bf6533ccecd02ec49d9a5b016f
2018-03-05 11:32:59 +08:00
Marek Grabowski e36f8069aa Add a metric exposing number of objects per type
Kubernetes-commit: f6e9ebffa2df10f7792fbea0a0fbe5ab8e388a26
2018-02-12 15:58:57 +00:00
halfcrazy 6f8c3a80da fix typo in package apiserver
Kubernetes-commit: 0da91a8577ddfdeaff985cbb6c0da69d5a2ffc81
2018-02-01 03:04:33 +08:00
Yu Liao 3365692578 sync: squashed up to merge eb7be2699bcbecb2703d3c046b27c2a8e8b1b6dd in 188e6ebcdbcfd0617dc12e51e8e6a66ce89f3955 2018-01-13 19:39:22 +00:00
xiangpengzhao 19cfabed24 Mark etcd-quorum-read as deprecated.
Kubernetes-commit: 2a454dcea0b867bab44796a86a8b27f04b49528d
2017-10-12 19:42:12 +08:00
Hitoshi Mitake a7bf68f0d6 storage, etcd3: add an option for configuring interval of compaction requests from apiserver
This commit adds an option for controlling request of compaction to
etcd3 from apiserver. There is a situation that apiserver cannot fully
own its etcd cluster (e.g. sharing it with canal). In such a case,
apiserver should have limited access in terms of etcd's auth
functionality so it don't have a priviledge to issue compaction
requests. It means that the compaction requests should be issued by
other component and apiserver's compaction requests are needless.

For such use cases, this commit adds a new flag
`storagebackend.Config.CompactionInterval`. If the flag is non 0,
apiserver issues the compaction requests like current behaviour (the
default is 5 minutes). If it is 0, apiserver doesn't issue the
requests. It can be configured with a newly added option of apiserver
`--etcd-compaction-interval`.

Kubernetes-commit: 87d4d3e92be6b93517f189082b0451cee6957ee5
2017-09-01 14:06:25 +09:00
Clayton Coleman 644d9a8cf1 Allow watch cache to be disabled per type
Currently setting watch cache size for a given resource does not disable
the watch cache. This commit adds a new `default-watch-cache-size` flag
to map to the existing field, and refactors how watch cache sizes are
calculated to bring all of the code into one place. It also adds debug
logging to startup to allow us to verify watch cache enablement in
production.

Kubernetes-commit: fc2d201e155296f311ae0a9278b00dcae2d68708
2017-09-09 21:44:33 +00:00
Dr. Stefan Schimanski a063c5336d apiserver: avoid panics on nil sub-option structs
Kubernetes-commit: b153268da79d2acf14e042945959801c3dba8221
2017-09-09 21:44:32 +00:00
Clayton Coleman 460257fd61 Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.

Kubernetes-commit: 8952a0cb722b77459cf2701632a30f5b264f5aba
2017-09-03 14:04:12 +00:00
bjhaid 7dfcb9c56f This adds an etcd health check endpoint to kube-apiserver
addressing https://github.com/kubernetes/kubernetes/issues/48215.

Kubernetes-commit: 47d748c5dc989ea46142569bf42636c622fe128a
2017-08-29 13:13:05 +00:00
xiangpengzhao 5f2f70a255 Validate --storage-backend type.
Kubernetes-commit: fcf2df9ad7ea688d75b2e9abb036b9d7abcc6e7c
2017-07-28 13:56:10 +00:00
deads2k 8401e3b61b change the default storage location to avoid double prefixing
Kubernetes-commit: bc3434c084e405769417a08195700cd6be02211f
2017-06-13 20:47:32 +00:00
Saksham Sharma 0b1c13686c Add configuration options for encryption providers
Add location transformer, config for transformers

Location transformer helps choose the most specific transformer for
read/write operations depending on the path of resource being accessed.

Configuration allows use of --experimental-encryption-provider-config
to set up encryption providers. Only AEAD is supported at the moment.

Add new files to BUILD, AEAD => k8s-aes-gcm

Use group resources to select encryption provider

Update tests for configuration parsing

Remove location transformer

Allow specifying providers per resource group in configuration

Add IdentityTransformer configuration option

Fix minor issues with initial AEAD implementation

Unified parsing of all configurations

Parse configuration using a union struct

Run configuration parsing in APIserver, refactor parsing

More gdoc, fix minor bugs

Add test coverage for combined transformers

Use table driven tests for encryptionconfig

Kubernetes-commit: 9760d00d08ef0619e30a7b1b90fd290cab960069
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 234a9303e9 apiserver: tri-state watch cache capacity: off, default, value
Kubernetes-commit: b799e62e1aa82a1f1ff87597e762734cd702cdee
2017-05-12 17:30:09 +00:00
deads2k b3af46c0dc wire in aggregation
Kubernetes-commit: 8e26fa25da6d3b1deb333fe2484f794795d1c6b9
2017-03-31 20:37:15 +00:00
Jordan Liggitt 0f41d276a9 Force etcd2 to use application/json, add base64-wrapper decoder as fallback
Kubernetes-commit: 87e32c75321bad09707683cb15d6a0c41f4b6f0d
2017-03-18 19:56:09 +00:00
Dr. Stefan Schimanski 73c30cda7e staging/src/*: run gofmt 2017-02-23 09:48:09 -05:00