Commit Graph

50 Commits

Author SHA1 Message Date
Abu Kashem 62a4b39be7 apiserver: make watch termination during shutdown configurable
Kubernetes-commit: 791fcd6fb429002349b3f697b1bcc68ff7146dde
2023-02-10 11:43:06 -05:00
Abu Kashem cb855a88b8 apiserver: CVE-2022-1996, validate cors-allowed-origins server option
Kubernetes-commit: 841311ada2b0ba58e623a89e2e5ac74de0d94d8c
2023-01-20 13:54:02 -05:00
lengrongfu 7deda7bdcd clean up master-service-namespace
Signed-off-by: lengrongfu <rongfu.leng@daocloud.io>

Kubernetes-commit: 556d3fc2b7b4dfd1d94d3039909ddb42d88f7c52
2022-12-13 18:13:16 +08:00
SataQiu 2c587cfaab kube-apiserver: mark unused master-service-namespace flag as deprecated
Kubernetes-commit: 3cd3ab5f943a5b0e1bc0dc53c90ed9cf0aa811ad
2022-09-30 16:13:13 +08:00
David Eads 6a7c6a0940 Revert "Add an option to conditionally disable compression based on client ip."
This reverts commit 023583a15586328569ccab505db2f57f398e04b3.

Kubernetes-commit: 2f3ffbed2cffaaba63304318bc1d09b0144600ff
2022-08-17 15:08:39 -04:00
Maciej Borsz 40280f9889 Add an option to conditionally disable compression based on client ip.
Kubernetes-commit: 023583a15586328569ccab505db2f57f398e04b3
2022-07-29 08:44:14 +00:00
ialidzhikov bce3488a65 apiserver: Remove the deprecated `--target-ram-mb` flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>

Kubernetes-commit: bdbc7501293eac721ea6f77b55918652f2cd6aab
2022-03-02 18:52:46 +02:00
William Zhang c0fcf30dd4 cleanup(apiserver): delete the --max-resource-write-bytes & --json-patch-max-copy-bytes description.
Change-Id: I0fe27dce27db6a1e186bd44a968c6e931de88dd8
Signed-off-by: William Zhang <warmchang@outlook.com>

Kubernetes-commit: 584165cfcc861bc0c8911e11347734cfc8feb8c8
2021-12-08 17:12:37 +08:00
Abu Kashem 033ff70436 Revert "Merge pull request #104281 from tkashem/not-ready-429"
This reverts commit fc5863b8b276e0789f717859e8cce58d7d060181, reversing
changes made to 027fe2554fd18343b8be39eddc8ff6570a6c390f.

Kubernetes-commit: f9f08725907b7db2104ee5fe9f82ab0752726533
2021-08-31 10:10:46 -04:00
Abu Kashem a687b3b7a9 Revert "Merge pull request #104630 from tkashem/remove-option"
This reverts commit edb0a72cff0e43bab72a02cada8486d562ee1cd5, reversing
changes made to 80feff6f407be9f0898c449ba3f9d4d013f05ec9.

Kubernetes-commit: 8844d3092a46a40915b4df6e3b9944d5081f8268
2021-08-31 10:06:12 -04:00
Abu Kashem ee2c906b05 apiserver: remove server option startup-send-retry-after-until-ready
Kubernetes-commit: 7adc79a4ea33cc44aa8d694c4949e01219e016de
2021-08-27 10:29:37 -04:00
Abu Kashem f3ae70d0cf send retry-after until ready
Kubernetes-commit: 6e3923d0a4f4720d2d9f628eb9c073d2d3ee291a
2021-08-10 12:03:21 -04:00
Abu Kashem ffb869e08f apiserver: add a new mode for graceful termination
add a new mode for graceful termination with the new server run option
'shutdown-send-retry-after'
- shutdown-send-retry-after=true: we initiate shutdown of the
  HTTP Server when all in-flight request(s) have been drained. during
  this window all incoming requests are rejected with status code
  429 and the following response headers:
    - 'Retry-After: N' - client should retry after N seconds
    - 'Connection: close' - tear down the TCP connection
- shutdown-send-retry-after=false: we initiate shutdown of the
  HTTP Server as soon as shutdown-delay-duration has elapsed. This
  is in keeping with the current behavior.

Kubernetes-commit: 3182b69e970bd1fd036ff839fdf811f14e790244
2021-07-14 10:39:29 -04:00
Mike Spreitzer feae5f3e79 Add config checking for inflight limits
When API Priority and Fairness is enabled, the inflight limits must
add up to something positive.
This rejects the configuration that prompted
https://github.com/kubernetes/kubernetes/issues/102885

Update help for max inflight flags

Kubernetes-commit: 0762f492c5b850471723a305cfa7390e44851145
2021-06-21 16:53:07 -04:00
KeZhang 23abb6c50f Fix HSTS Missing From HTTPS Server(Nessus Scanner)
Kubernetes-commit: 4801f4d25506dbfed834c67e3fc363bfab54a48e
2020-11-12 16:10:58 +08:00
wojtekt db5fe3e7d4 Remove heuristic watchcache sizes
Kubernetes-commit: 5ceb53987be7fe9ea6b43ba568f6f6f500ca2488
2020-06-05 14:37:01 +02:00
Johannes M. Scheuermann b0438a0d98 Update kube-apiserver flag comments
Kubernetes-commit: bd42094d90124ba79cbacac6f41336e1d39999c1
2020-05-25 15:43:56 +02:00
Lingfei Kong 76c4d459f2 fix the wrong function description
Kubernetes-commit: fa73cacc5d4d2250f3ea8fe519bcbb0a02309b28
2020-05-25 15:04:01 +08:00
chenjun.cj e5c6ec44de add a new generic filter goaway
Kubernetes-commit: 81f46b64a35f3af096d50620dfcc78b003de8263
2020-02-28 05:27:25 +08:00
Jonathan Tomer 3a2c32b513 Rename --enable-inflight-quota-handler to --enable-priority-and-fairness.
The old flag name doesn't make sense with the renamed API Priority and
Fairness feature, and it's still safe to change the flag since it hasn't done
anything useful in a released k8s version yet.

Kubernetes-commit: 711c1e17209cc410440eecd3723e7b4906ca0e42
2020-02-27 14:04:37 -08:00
Mike Spreitzer 1c79014daa Added API Priority and Fairness filter and config consumer
Kubernetes-commit: 73614ddd4e42728a36c7ac6b7b20f27c8032cafb
2020-01-25 19:47:12 -05:00
Charles Eckman af3997fcac Provide OIDC discovery endpoints
- Add handlers for service account issuer metadata.
- Add option to manually override JWKS URI.
- Add unit and integration tests.
- Add a separate ServiceAccountIssuerDiscovery feature gate.

Additional notes:
- If not explicitly overridden, the JWKS URI will be based on
  the API server's external address and port.

- The metadata server is configured with the validating key set rather
than the signing key set. This allows for key rotation because tokens
can still be validated by the keys exposed in the JWKs URL, even if the
signing key has been rotated (note this may still be a short window if
tokens have short lifetimes).

- The trust model of OIDC discovery requires that the relying party
fetch the issuer metadata via HTTPS; the trust of the issuer metadata
comes from the server presenting a TLS certificate with a trust chain
back to the from the relying party's root(s) of trust. For tests, we use
a local issuer (https://kubernetes.default.svc) for the certificate
so that workloads within the cluster can authenticate it when fetching
OIDC metadata. An API server cannot validly claim https://kubernetes.io,
but within the cluster, it is the authority for kubernetes.default.svc,
according to the in-cluster config.

Co-authored-by: Michael Taufen <mtaufen@google.com>

Kubernetes-commit: 5a176ac77241ff059f22609fc569ac219334238c
2019-01-29 13:46:37 -08:00
Jin Hase 132e8e3270 Clean up kube-apiserver reference document
Kubernetes-commit: 49b6e40461766dc7785c99cd0be77b6db37d5d75
2019-12-24 21:21:06 +09:00
Mike Spreitzer b017e16e12 Renamed FeatureGate RequestManagement to APIPriorityAndFairness
The old name is too broad, we wanted a name that is more specific to
the actual feature.

This is an alpha gate, and no release has yet associated any
functionality with this gate.

Kubernetes-commit: 76d090e30f917888c5882228f7261ed31a34a2ab
2019-11-14 01:34:59 -05:00
Tim Bannister 9e2288c881 Fix typo
Kubernetes-commit: bbccdcd8531a6377c1fe2937aef24f61caef43c4
2019-09-25 18:02:40 +01:00
Elana Hashman 754a749970 Fix typo in EnableInf*l*ightQuotaHandler flag
Kubernetes-commit: a71178ef62053555592c37caec8cd4c635231970
2019-08-23 15:16:29 -07:00
Han Kang 050d1b223c add /livez as a liveness endpoint for kube-apiserver
go fmt

make func private

refactor config_test

Two primary refactorings:

1. config test checkPath method is now each a distinct test
run (which makes it easier to see what is actually failing)

2. TestNewWithDelegate's root path check now parses the json output and
does a comparison against a list of expected paths (no more whitespace
and ordering issues when updating this test, yay).

go fmt

modify and simplify existing integration test for readyz/livez

simplify integration test

set default rbac policy rules for livez

rename a few functions and the entrypoint command line argument (and etcetera)

simplify interface for installing readyz and livez and make auto-register completion a bootstrapped check

untangle some of the nested functions, restructure the code

Kubernetes-commit: aa1b2d6d35c92a31be17357fc66cfc1eca8a67e0
2019-08-26 16:57:25 -07:00
Dr. Stefan Schimanski 5f126c4400 apiserver: add --shutdown-delay-duration to keep serving until LBs stop serving traffic
Kubernetes-commit: 408f36b8825136c2b1771f642d88557e83a2ddb7
2019-02-22 15:13:28 +01:00
Han Kang 7fd71e31ef add readyz endpoint for kube-apiserver readiness checks
add startup sequence duration and readyz endpoint

add rbac bootstrapping policy for readyz

add integration test around grace period and readyz

rename startup sequence duration flag

copy health checks to fields

rename health-check installed boolean, refactor clock injection logic

cleanup clock injection code

remove todo about poststarthook url registration from healthz

Kubernetes-commit: 54dcf5c9c46fc4782d4861936309349b5a71a1ac
2019-05-30 11:19:49 -07:00
Daniel (Shijun) Qian 3a0abf14e5 fix duplicated imports of k8s code (#77484)
* fix duplicated imports of api/core/v1

* fix duplicated imports of client-go/kubernetes

* fix duplicated imports of rest code

* change import name to more reasonable

Kubernetes-commit: 5268f69405251a4a74130fa903e055a59071179a
2019-05-08 18:39:56 +00:00
yue9944882 735ce2f371 add new flag for enabling requests mgmt handler
Kubernetes-commit: 87d09301e59ac65e55dba32614b8e8b3bae2dd8f
2019-04-15 14:57:55 +08:00
Chao Xu 4ebbf20f41 Adding a limit on the maximum bytes accepted to be decoded in a resource
write request.

Kubernetes-commit: b971b12d3cfa8887aa87957fbba92b90e3e99dc6
2019-02-06 16:58:24 -08:00
Chao Xu f60d1ce95c Set the maximum size increase the copy operations in a json patch can cause
Kubernetes-commit: f001f9e1dbce644a1b7d22b370ab37fc7d770c7e
2019-02-04 11:15:16 -08:00
Jordan Liggitt d294e6b5b4 Update non-test code to use DefaultMutableFeatureGate
Kubernetes-commit: d440ecdd3b41a4fc4a207195e1bb976422d6d35e
2018-11-20 23:59:52 -05:00
hangaoshuai f38497678f add checks validation MinRequestTimeout of ServerRunOptions
Kubernetes-commit: ba20be9911091f16bb3987815172b3a348754fc2
2018-04-26 16:02:31 +08: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
Joe Betz e1e8bebf50 Add --request-timeout to allow the global request timeout of 60 seconds to be configured.
Kubernetes-commit: cb764756c6f152bfb866b161315369bc47ebf13c
2017-08-29 13:18:50 +00:00
xiangpengzhao 49516f112c Remove deprecated flag "long-running-request-regexp".
Kubernetes-commit: 72f4ab70e28a945ce25d40524696d0a486f8969e
2017-08-29 13:18:48 +00:00
m1093782566 7313c11a9e add validation for fed-apiserver
Kubernetes-commit: f2ea31fd925f764f8c684710d9cd345663e88d17
2017-08-29 13:16:11 +00:00
p0lyn0mial 3422dafac7 Split out AdmissionOptions
In the long term AdmissionOptions will accepts various dependencies
and spit out AdmissionControl

Kubernetes-commit: de9706bc15ffc3a6a4ef30a00d5c7ea9a8881396
2017-04-21 20:35:37 +00:00
Dr. Stefan Schimanski 320e34b1d9 pkg/admission: make plugin registry non-global
Kubernetes-commit: 63f547e1b15ed94ef91c69a7e294b3506bd8c918
2017-04-12 20:35:22 +00:00
deads2k c2afcd59a6 move insecure options to kubeapiserver
Kubernetes-commit: c2f8ef1b1a4e0e60379b7b7447d59a87b0b0ccf9
2017-03-31 20:37:15 +00:00
deads2k 8c644986dc require codecfactory
Kubernetes-commit: 087a03022106c02f82a497f65b945f3cbab3f643
2017-03-31 20:37:15 +00:00
deads2k 9d21f84d8f streamline etcd options for aggregated api server 2017-02-13 07:36:42 -05:00
deads2k 5566a0ef65 move storage serialization type to etcd options 2017-02-13 07:36:42 -05:00
deads2k 2e34520350 add feature enablement options to recommendedoptions 2017-02-13 07:36:42 -05:00
deads2k 8c39f8c871 move --runtime-config to kubeapiserver 2017-02-13 07:36:42 -05:00
deads2k d3c1c03062 move auditoptions to separate struct 2017-02-13 07:36:42 -05:00
deads2k 284a95797b apiserver command line options lead to config 2017-02-13 07:36:41 -05:00
deads2k c4b078bb1d move apiserver options 2017-02-02 09:36:48 -05:00