Commit Graph

409 Commits

Author SHA1 Message Date
Stefan Bueringer c8433b21e4 fix staticcheck: vendor/k8s.io/apiserver/pkg/server
Kubernetes-commit: ed0adcb65e92198177bf23db97807b3312d6be29
2020-11-17 11:58:13 +01:00
yue9944882 a4a3fc9b87 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>

Kubernetes-commit: 849be447f563fc93a27a0827fb1185b885b57114
2020-11-04 16:33:14 +08:00
Lukasz Szaszkiewicz e275c178b6 DelegatingAuthenticationOptions: allows for setting a timeout for the TokenReview client that is used by for the webhook authenticator
Previously no timeout was set. Requests without explicit timeout might potentially hang forever and lead to starvation of the application.
When no timeout was specified a default one will be applied.

Kubernetes-commit: 7340c3498ac23f46fc8b6bff4d5ac664a9c64a3b
2020-11-04 11:14:44 +01: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
Abu Kashem 5254108841 make backoff parameters configurable for webhook
Currently webhook retry backoff parameters are hard coded, we want
to have the ability to configure the backoff parameters for webhook
retry logic.

Kubernetes-commit: 53a1307f68ccf6c9ffd252eeea2b333e818c1103
2020-10-30 11:25:32 -04:00
卢振兴10069964 3e37d6db5c add audit-log-compress to apiserver
Kubernetes-commit: 9470f64a4f8af6439cb6c5c35335121446faade3
2020-08-18 11:26:07 +08:00
Lukasz Szaszkiewicz 972d12cb5f DelegatingAuthorizationOptions: exposes and sets a default timeout for SubjectAccessReview client
previously no timeout was set. Requests without explicit timeout might potentially hang forever and lead to starvation of the application.

Kubernetes-commit: 2160cbc53fdd27a3cbc1b361e523abda4c39ac42
2020-10-20 14:39:45 +02:00
Andrew Sy Kim 6746ccadda apiserver: support egress selection name 'controlplane' and deprecate 'master'
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>

Kubernetes-commit: a0aebf96ec2eef6517e2611335f0e6c9375dd807
2020-10-26 10:24:16 -04:00
Jordan Liggitt b7440ce51e Deflake serving options, avoid hard-coding ports
Kubernetes-commit: ec3faa18213fd1386c3fddca40061d6b4a7df22d
2020-09-04 15:55:01 -04:00
Ken Sipe ce7f425acc fix S1002 omit comp to bool
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: e8878687b18fd961e9f3e29c1c46fe018157a77d
2020-06-26 10:36:38 -05:00
wojtekt db5fe3e7d4 Remove heuristic watchcache sizes
Kubernetes-commit: 5ceb53987be7fe9ea6b43ba568f6f6f500ca2488
2020-06-05 14:37:01 +02:00
David Eads a3201bc883 remove dynamic audit
Kubernetes-commit: ed4e6f10265ae32b1c2c0b254a4d2c20590cfadd
2020-05-27 14:04:09 -04: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
Paulo Gomes 749479fedb Warn when insecure TLS ciphers are selected.
Kubernetes-commit: 550a67869a7290688dde4aeedbcdd72a10e448cf
2020-05-13 16:11:28 +01: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 513afab811 expose RunOnce method on RequestHeaderAuthRequest controller
Kubernetes-commit: f3a7f057c423caf77b0c5315d7728727c4b35bde
2020-04-28 15:35:17 +02:00
Lukasz Szaszkiewicz 07cdc792bb provides DynamicRequestHeaderController that combines DynamicCAFromConfigMapController and RequestHeaderAuthRequestController into one controller
the unified controller will dynamically fill RequestHeaderConfig struct

Kubernetes-commit: cb4b4cb5a6ffdf1c7f199e644a8b5cac2367d504
2020-04-28 12:48:21 +02:00
jingyih 9303178e27 Add a metric exposing etcd database size
Kubernetes-commit: 922ec728de9248657f026eb6cfb8fdaeb11049ac
2020-03-16 07:55:38 -07:00
Monis Khan 7fa523535d Remove support for basic authentication
This change removes support for basic authn in v1.19 via the
--basic-auth-file flag.  This functionality was deprecated in v1.16
in response to ATR-K8S-002: Non-constant time password comparison.

Similar functionality is available via the --token-auth-file flag
for development purposes.

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

Kubernetes-commit: df292749c9d063b06861d0f4f1741c37b815a2fa
2020-03-11 14:31:31 -04:00
Mateusz Gozdek e843f3790e kube-apiserver: use SO_REUSEPORT when creating listener on Unix systems
So multiple instances of kube-apiserver can bind on the same address and
port, to provide seamless upgrades.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>

Kubernetes-commit: dfe1f968ac31ba9b81a353d4de86d28e73d22d4e
2020-03-06 09:59:20 +01:00
immutablet 209aff3d4b Hide methods in the encryption config that are not used outside the package.
Kubernetes-commit: 922e0bfaec0a8b25fdb04e559ac454c416f8c2e8
2020-03-05 16:54:27 -08:00
chenjun.cj e5c6ec44de add a new generic filter goaway
Kubernetes-commit: 81f46b64a35f3af096d50620dfcc78b003de8263
2020-02-28 05:27:25 +08:00
Jefftree 13613a1c15 Address comment and remove if condition
Kubernetes-commit: 61fa4e6c098559b65fe28c1bf55cb817697e38e5
2020-02-27 17:18:57 -08:00
Jefftree 28f8e6670e audit webhook use network proxy
Kubernetes-commit: cd57b830c142e2b9938ff801619070cf601c1422
2019-12-19 12:29:37 -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
Vincent C 27ae2b291d replaced tokenaccessreview with tokenreview
Kubernetes-commit: b410f77d3140ebc19037e6089d0d45980f0c6edf
2020-02-19 22:41:35 +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
Mike Danese 337d7943db generated: run refactor
Kubernetes-commit: 3aa59f7f3077642592dc8a864fcef8ba98699894
2020-02-07 18:16:47 -08:00
Tim Allclair 56dc51d310 Ensure testing credentials are labeled as such
Kubernetes-commit: 9d3670f3586c98c02cdca93b7c98dd91fc0b87bd
2020-02-04 10:36:05 -08:00
willise f0281f38ec fix: typos in comments of admission
Kubernetes-commit: e8b5658bd11384d2796f9512f6edb95c632a0a59
2020-01-10 14:01:06 +08: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
Antonio Ojea e29a8f8fd0 clarify apiserver bind-address flag usage
From the listen godoc:

For TCP networks, if the host in the address parameter is empty or a
literal unspecified IP address, Listen listens on all available unicast
and anycast IP addresses of the local system.

Since the BindNetwork options is "tcp" by default, using an unspecified
address doesn't bind the listener to the IP family.

Kubernetes-commit: 05010d23ac7751a17aa26fb5cc011eb4f2127b1e
2020-01-04 10:51:48 +01:00
Jin Hase 132e8e3270 Clean up kube-apiserver reference document
Kubernetes-commit: 49b6e40461766dc7785c99cd0be77b6db37d5d75
2019-12-24 21:21:06 +09:00
Antonio Ojea 223a85f36f apiserver: add localhost to alternateDNS for IPv6
apiserver adds localhost to the alternateDNS field
if the bind address is 0.0.0.0.
This PR considers the IPv6 unspecified address too.

Kubernetes-commit: 29ec87f769c6494fad5c0a0c624efe2dc6eeab13
2019-12-20 12:10:59 +01:00
Shihang Zhang 6207833539 ping kmsplugin gentely when in good state
Change-Id: I50ce249d7996e5c51dcbb00e53d67300aa72a87f

Kubernetes-commit: c084d57b18a7c90c14bc13dc2daa256e84037a74
2019-12-02 16:38:03 -08:00
immutablet 5cec6b4746 Add defaulting logic for EncryptionConfiguration.
Kubernetes-commit: a151aa35dc21881d178e498141e5f58df13fb400
2019-11-14 22:53:18 -08: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
immutablet 6e01b8c8f3 Move test inputs for EncryptionConfiguration tests into testdata.
Kubernetes-commit: 883e9a0b502b787a9454e10c26e324ffaa30eb29
2019-11-13 16:38:20 -08:00
Jordan Liggitt 54aa70b012 Add support for --runtime-config=api/beta=false, --feature-gates=AllBeta=false
Allow disabling all beta features and APIs

Kubernetes-commit: a5760dee812d280e4de203fccf58214051d0d62a
2019-10-12 09:59:14 -04:00
David Eads 0de0bb0422 dynamic reload cluster authentication info for aggregated API servers
Kubernetes-commit: 3aede35b3b042e8a626e8fb9e1e181e73cd29d0a
2019-11-04 13:46:28 -05:00
Jordan Liggitt 4b9c976f43 AdmissionConfiguration v1
Kubernetes-commit: 1234290adfa11eb3dd34242c296e1f1dbe211c19
2019-11-11 11:57:29 -05:00
David Eads 331894196f add featuregate inspection as admission plugin initializer
Kubernetes-commit: 675c2fb924e82091f7ce4601e48daf4cc7030e72
2019-11-05 14:28:40 -05:00
Jordan Liggitt 52b3bfb8fa Switch kubelet/aggregated API servers to use v1 subjectaccessreviews
Kubernetes-commit: d54a70db5cfc0887e2f5177b0c3f795947be6eb4
2019-11-04 23:29:56 -05:00
Jordan Liggitt 086ad4b0b9 Switch kubelet/aggregated API servers to use v1 tokenreviews
Kubernetes-commit: 5ef4fe959a45e423d2b992e9c21e6e9db4b950c5
2019-11-04 22:41:32 -05:00
Dan Winship 0031a567fa Fix apiserver to advertise IPv6 endpoints if bound to IPv6
Also rename utilnet.ChooseBindAddress() to ResolveBindAddress(), to
better describe its functionality.

Kubernetes-commit: afa0b808f873b515c9d58a9ead788972ea7d2533
2019-10-30 10:46:46 -04:00
Mike Danese 44b9fc84ab migrate callers to g/g/uuid
Kubernetes-commit: a4ca9e6c93e45b4a97e7d04df37362299088f64a
2019-11-04 23:15:20 -08: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
Wenjia Zhang e518fe04f6 Resolve uncompatibility from update: etcd CAFile -> TrustedCAFIle
Kubernetes-commit: 9ead9373f350c7ad438257a9e8b8977a67b900eb
2019-10-23 11:15:43 -07: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
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 703545a3db add the ability for dynamic header names in delegated authentication
Kubernetes-commit: 58256346693717fd12f121f0cf74fe1e003edb0f
2019-10-03 12:56:42 -04:00
Tim Bannister 9e2288c881 Fix typo
Kubernetes-commit: bbccdcd8531a6377c1fe2937aef24f61caef43c4
2019-09-25 18:02:40 +01:00
David Eads eee025a27a add ability to authenticators for dynamic update of certs
Kubernetes-commit: 51195dd86012c4c4b17a1707ef50a46fa046f74f
2019-09-05 09:59:59 -04:00
chenyaqi01 4f9778fb9d replace bytes.Compare() with bytes.Equal()
Kubernetes-commit: 66be69bb0e7fd147be650385d272ae14ee2857c8
2019-09-27 10:06:50 +08:00
Han Kang 26cf2f2052 expose and use an AddHealthChecks method directly on config
Kubernetes-commit: 97b58ece4a2ad1a366a9cf7deea9581373931238
2019-09-13 17:04:00 -07:00
mengyang02 0da8f30350 replace time.Now().Sub with time.Since
Kubernetes-commit: 0205215425607a7a390eaa6493033511626bb189
2019-09-03 20:43:32 +08:00
Monis Khan 298cf1beec Encryption config: correctly handle overlapping providers
This change updates NewPrefixTransformers to not short-circuit on
the first transformer that has a matching prefix.  If the same type
of encryption ProviderConfiguration is used more than once, they
will share the same prefix.  A failure in the first one should not
prevent a later match from being attempted.

Added TestCBCKeyRotationWithOverlappingProviders unit test to
prevent regressions.  Note that this test explicitly exercises this
flow using an EncryptionConfiguration object as the structure of the
resulting transformer is an important part of the check.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: 4dc16f29a7285a4bcaff1915728953d8a55e1b6e
2019-09-06 12:09:43 -04:00
Elana Hashman 754a749970 Fix typo in EnableInf*l*ightQuotaHandler flag
Kubernetes-commit: a71178ef62053555592c37caec8cd4c635231970
2019-08-23 15:16:29 -07:00
Walter Fender da748a626b Add support for konnectivity service to the etcd3 client.
If konnectivity service is enabled, the etcd client will now use it.
This did require moving a few methods to break circular dependencies.

Factored in feedback from lavalamp and wenjiaswe.

Kubernetes-commit: edbb0fa2fe2084d5d9ce0cf9dc0d1b2d820bb392
2019-08-27 15:58:06 -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
Han Kang 2b0c93afef rename healthz methodNames to be more consistent w/ present day usages
Kubernetes-commit: 2e23788fda86c68e7f17cf0b66ee1017594c1055
2019-08-13 12:42:13 -07:00
Walter Fender 9bdac68d70 Get network-proxy working with GCE.
Got the proxy-server coming up in the master.
Added certs and have it comiung up with those certs.
Added a daemonset to run the network-agent.
Adding support for agent running as a sameon set on every node.

Added quick hack to test that proxy server/agent were correctly
tunneling traffic to the kubelet.

Added more WIP for reading network proxy configuration.
Get flags set correctly and fix connection services.
Adding missing ApplyTo
Added ConnectivityService.
Fixed build directives. Added connectivity service configuration.
Fixed log levels.
Fixed minor issues for feature turned off.
Fixed boilerplate and format.
Moved log dialer initialization earlier as per Liggits suggestion.
Fixed a few minor issues in the configuration for GCE.
Fixed scheme allocation
Adding unit test.
Added test for direct connectivity service.

Switching to injecting the Lookup method rather than using a Singleton.
First round of mikedaneses feedback.
Fixed deployment to use yaml and other changes suggested by MikeDanese.

Switched network proxy server/agent which are kebab-case not camelCase.
Picked up DIAL_RSP fix.
Factored in deads2k feedback.
Feedback from mikedanese
Factored in second round of feedback from David.
Fix path in verify.
Factored in anfernee's feedback.
First part of lavalamps feedback.
Factored in more changes from lavalamp and mikedanese.

Renamed network-proxy to konnectivity-server and konnectivity-agent.
Fixed tolerations and config file checking.
Added missing strptr
Finished lavalamps requested rename.
Disambiguating konnectivity service by renaming it egress selector.

Switched feature flag to KUBE_ENABLE_EGRESS_VIA_KONNECTIVITY_SERVICE

Kubernetes-commit: ebb65c5f4c51340f42c260cf00bde8629ed68d74
2019-05-20 12:44:51 -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
immutablet 5faffb9123 Allow kube-apiserver to test the status of kms-plugin.
Kubernetes-commit: 05fdbb201ffbaff4e92f0899f9e2ca038febb88d
2019-05-30 11:15:35 -07:00
Andy Goldstein 637cea444b Fix max port value to 65535
Signed-off-by: Andy Goldstein <goldsteina@vmware.com>

Kubernetes-commit: 9bba2c93ec6042fc4140afecc672f025ba491928
2019-06-24 15:13:27 -04: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
Andrew Kim ef71315b08 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate
Kubernetes-commit: c91913924543e1d29f3f3d51354701df9df75def
2019-03-04 12:46:52 -05: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
Yassine TIJANI 72bd8c7a64 use cache size to signal undecorated storage
Kubernetes-commit: 8261d3d9a63f0972453f6503b62299a96ecee657
2019-02-20 22:15:24 +01:00
Justin SB cc4525538b Remove executable permission from testdata
Kubernetes-commit: 19a5528a65bf59bed6289703e1811640b53b2087
2019-01-03 12:21:19 -05:00
Andrew Lytvynov 3604e0cbb0 Extract new keyutil package from client-go/util/cert
This package contains public/private key utilities copied directly from
client-go/util/cert. All imports were updated.

Future PRs will actually refactor the libraries.

Updates #71004

Kubernetes-commit: 18458392ca24c85c688e655aace1afd04f864cbd
2018-12-09 16:24:38 -08:00
Mehdy Bohlool 0fbb46dc25 Remove the propagated scheme from the Admission chain
Kubernetes-commit: cebb4ee2ac9e19fe90f78c3285978e585e67a3ac
2019-02-16 13:28:14 -08:00
Justin SB 3883f41494 Add code comments to guard inadvertent removal of insecure-bind-address
Though the flags are deprecated, the deprecation process revealed that
the flag is important for health checks in more secure environments.
Add a link to #43784 to help developers understand why the flags have
not yet been removed.

Issue #43784
Issue #74172
Issue #59018

Kubernetes-commit: 7dbbab0476b35b74f600f62b6751212ed3afe574
2019-02-18 12:58:59 -05:00
David Eads 743057093a allow apiservers to override the list of decorators
Kubernetes-commit: ad740bbba58e48d5ff8353419066b7fd30abfa45
2019-02-18 14:24:14 -05:00
David Eads af92b436cc prevent unhandled errors on colliding poststarthook registration
Kubernetes-commit: 8d0c56e22f73fdb1a82a12475909e7d69f4bec08
2019-02-14 14:07:18 -05:00
Marek Counts c7299d9da0 Moved flag and globalflag
Moved all flag code from `staging/src/k8s.io/apiserver/pkg/util/[flag|globalflag]` to `component-base/cli/[flag|globalflag]` except for the term function because of unwanted dependencies.

Kubernetes-commit: 7744f908306e5131be5a94815ac76a7cba6454f2
2019-02-15 10:28:13 -05:00
Justin SB bf98046128 Remove executable file permission from OWNERS files
Kubernetes-commit: dd19b923b7c26420af39fcf4eedfa213b236c8d3
2019-01-03 12:18:20 -05: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
Roy Lenferink 4c9524b9fb Updated OWNERS files to include link to docs
Kubernetes-commit: b43c04452f3b563473b5c2a765d4ac18cc0ff58f
2019-01-30 20:05:00 +01: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 123cf8011f Remove alpha InitializerConfiguration types, Initializers admission plugin
Kubernetes-commit: dc1fa870bff65c20f48a83ea3af54adb3f526e28
2019-01-16 10:19:44 -05:00
Patrick Barker 3039935d60 adds dynamic audit integration test
Kubernetes-commit: d995047366153d86f0061b829ee4e7657f17996b
2018-10-16 16:17:33 -06:00
qingsenLi 1e20513561 fix typo and instead of amd
Kubernetes-commit: 3e83f0f08abab4c10dfab7053529709883c9b834
2018-10-30 01:27:50 +08:00
Jordan Liggitt 2109711572 Remove build/verify scripts for swagger 1.2 API docs, API server swagger ui / swagger 1.2 config
Kubernetes-commit: 9229399bd6049bc7766829b436d5cb5fe0dfe2f1
2019-01-15 10:44:36 -05:00
immutableT 9c474d9c53 require timeout to be greater than zero.
add unit test to cover timeout behaviour.

Kubernetes-commit: 39aca564749cd92ed1cfec7129eb3f6593549137
2019-01-04 17:06:07 -08:00
immutableT d9414ee2ab Expose kms timeout value via encryption config.
Kubernetes-commit: a4dc53cfeb91ee07cedcc6959e88e30cb0c3cca8
2019-01-03 14:26:57 -08:00
David Eads 1702e95788 fix typo in warning advice for permissions
Kubernetes-commit: 1105e4e0d1c0e78e2a203a136e9f8bcaff5c36ab
2019-01-04 09:58:06 -05: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 a3f2a871b3 Surface help for insecure ports to explain how to disable
Kubernetes-commit: 819b502768034b8104904cd7031db8c4838f900a
2018-11-30 10:52:37 -05:00
Jordan Liggitt 232ebfaeaf Allow kube-scheduler to tolerate cluster auth config lookup failure
Kubernetes-commit: 416e11421590838f0022242bff1db10da595b074
2018-12-05 13:51:06 -05:00
Jordan Liggitt d294e6b5b4 Update non-test code to use DefaultMutableFeatureGate
Kubernetes-commit: d440ecdd3b41a4fc4a207195e1bb976422d6d35e
2018-11-20 23:59:52 -05: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
Daniel Kłobuszewski 877329b0f3 Add option to k8s apiserver to reject incoming requests upon audit failure
Kubernetes-commit: 7a10f4eda725f55bec9893eb1c03f2402dbcd32f
2018-07-03 14:40:55 +02:00
Slava Semushin e2bc8e4617 Introduce kubeapiserver.config.k8s.io/v1 with EncryptionConfiguration and use a standard method for parsing config file.
Co-authored-by: Stanislav Laznicka <slaznick@redhat.com>

Kubernetes-commit: c21cb548e6c7d4ab019fce8a35c9b99c035c2071
2018-05-02 18:21:38 +02:00
WanLinghao f78d7e624c fix a description error in DynamicAuditing feature
Kubernetes-commit: 84aa00c03df00eade6615ca009fa9b2943a98b8c
2018-11-17 01:49:02 +08:00
Patrick Barker 9fd62b6f47 adds dynamic audit configuration
Kubernetes-commit: eb89d3dddd3792b0a6cd724e64bbbc11d6c15380
2018-10-18 21:34:17 -05:00
Davanum Srinivas 2710b17b80 Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135

Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
2018-11-09 13:49:10 -05:00
tanshanshan 631dda550e kube-scheduler: enable secure ports 10259
Kubernetes-commit: cb95edafe8bf4f294beb53d0a7bc04d62584577c
2018-09-05 16:42:16 +08:00
Davanum Srinivas 032ec9d79b Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31

Kubernetes-commit: 43f523d405b012fa8d90dd95b667f520e036f6bc
2018-11-02 16:41:57 -04:00
David Eads 257a06e88a add With method for allowed URL options on delegated authorization
Kubernetes-commit: 77b56ec9e36dd721c341ce838d608e8af10ce51f
2018-11-06 10:44:29 -05:00
Jordan Liggitt 136e478e9f encryption-at-rest approvers/reviewers
Kubernetes-commit: 666c93a8343029a499ea64de8a6d09596097ccb3
2018-11-02 17:38:17 -04:00
David Eads 83c8e657ed allow delegated authorization to have privileged groups
Kubernetes-commit: 0b70b7a7c975589f7019e5017c334cf0ee6b819f
2018-11-05 16:23:20 -05:00
Chao Wang f8fa426bd3 Use `audit.k8s.io/v1` as default value of option --audit-webhook-version and --audit-log-version in release 1.13
Kubernetes-commit: 9671a035f7e7308ac804b4637af19bac2ecce0f4
2018-10-31 17:22:37 +08:00
Jordan Liggitt 22df332aff Allow components to generate certificates in-memory
Kubernetes-commit: b7160d4ee2073f06293d7c3b20acdf4620fadf61
2018-10-16 17:22:13 -04:00
Jordan Liggitt c7c9a358c2 etcd2 code cleanup, remove deserialization cache
Kubernetes-commit: c8db31b84adc40aa875917fbca27b2a787902088
2018-10-15 22:17:44 -04:00
Eric Chiang 13ab2dca08 Remove ericchiang from OWNERS files
Kept myself in the OpenID Connect ones for now.

Kubernetes-commit: 766f5875bfa0d8ce4d52cdb87d12faea527e1492
2018-10-11 18:11:15 -07: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
Solly Ross 41e5031224 Populate ClientCA in delegating auth setup
kubernetes/kubernetes#67768 accidentally removed population of the the ClientCA
in the delegating auth setup code.  This restores it.

Kubernetes-commit: 65cea86e4413cb5899c3b89bda375bb326de5093
2018-10-04 12:48:18 -04:00
Jordan Liggitt 3b6fc08803 Remove etcd2 storage backend
Kubernetes-commit: 85ae79500fba7d6e51292b12daff829027b59872
2018-10-01 16:48:14 -04:00
immutablet e9bce895cf Lazily dial kms-plugin.
Kubernetes-commit: 07cbf2545f705d0448631f479a18d0b86b7055dc
2018-09-12 14:56:44 -07:00
Dr. Stefan Schimanski 1a58e1c6ad apiserver: make InClusterConfig errs for delegated authn/z non-fatal
Kubernetes-commit: 04e793e65ad70df5c4ab280c42740864e54163cd
2018-09-05 09:12:19 +02:00
Dr. Stefan Schimanski c8f47fd79c apiserver: fix misleading delegated authn/z warnings
Kubernetes-commit: 059fce63b755ef6052db273fd6c91f3090036389
2018-09-05 09:11:45 +02:00
Justin Santa Barbara ecbc9eada2 Fix grammar in secure-port flag help
The phrasing made it difficult to understand the message.

Kubernetes-commit: c0ded2d9f5beb5eb02b356076166c365073a639a
2018-08-30 18:50:26 -04:00
Dr. Stefan Schimanski c726863192 apiserver: make not-found external-apiserver-authn configmap non-fatal
Kubernetes-commit: 5d56e791bb932cc297de08db302540684e6f9d4c
2018-08-24 18:30:58 +02:00
Marian Lobur 7dbcbd39e2 Remove deprecated legacy audit logging code.
Kubernetes-commit: 3f730d4c255e7c8ee67a020eed0b8f0a8f634750
2018-07-05 13:57:17 +02:00
Dr. Stefan Schimanski 16d4968bf9 authn/z: optionally opt-out of mandatory authn/authz kubeconfig
Kubernetes-commit: a671d65673590f0dfcf5c2b673e1518d11510bdb
2018-08-22 11:56:07 +02:00
David Eads 34ff0933dd expose generic storage factory primitives
Kubernetes-commit: 81b9213ac2cc7744b8a62ac42b269b97c1d17b5a
2018-08-27 10:45:52 -04:00
Dr. Stefan Schimanski cfb1e16b55 apiserver: unify handling of unspecified options in authn+z
Kubernetes-commit: 0ede948e47d33474a4e30c845d7896c58a319e39
2018-08-21 16:42:13 +02:00
Dr. Stefan Schimanski a8bd1ddbf7 delegated authz: add AlwaysAllowPaths mechanism to exclude e.g. /healthz
Kubernetes-commit: 6142e2f8f7c8b1c5d32a2f9aa3715ea0b5baf167
2018-08-17 17:03:16 +02:00
hangaoshuai c27f181946 add unit test func TestServerRunOptionsValidate
Kubernetes-commit: cdef8029d4aea52e607da4101ad44b1b4163f869
2018-08-22 10:19:13 +08:00
hangaoshuai 7e18a5d0a6 add unit test func TestToAuthenticationRequestHeaderConfig
Kubernetes-commit: 0da04d61ab4b70817083c8208af12397b818546a
2018-08-22 10:18:30 +08:00
hangaoshuai 769565b214 add unit test func TestAPIEnablementOptionsValidate
Kubernetes-commit: 73ee10495b5be414b9fae718e5129765c7c3ed19
2018-08-22 10:17:58 +08:00
hangaoshuai c872082b0a add unit test func TestEtcdOptionsValidate and TestParseWatchCacheSizes
Kubernetes-commit: 67a1d53bd74265637718b67c80f48a26b6e653cf
2018-08-22 10:17:26 +08:00
Dr. Stefan Schimanski a549f2934f kube-apiserver: switch apiserver's DeprecatedInsecureServingOptions
Kubernetes-commit: d787213d1b8802d370032d17157ac1de7573ad15
2018-08-06 16:31:23 +02:00
Dr. Stefan Schimanski 3698d7a898 apiserver: move controller-manager's insecure config into apiserver
Kubernetes-commit: 1d9a896066b3e10e8c1a0d506e00bc354b7772f0
2018-08-16 20:47:15 +02:00
Tim Allclair 8e1390d9d4 Synchronous & unbatched audit log writes
Kubernetes-commit: c9670d0652f8d7da662f71caac6fca2044296ae6
2018-03-15 00:44:46 -07:00
fqsghostcloud 0fc525d3c8 fix typo
fix typo

Kubernetes-commit: 18f1ad7dc5392cb4537fa33bd73cdb8dc2c1e523
2018-08-13 17:36:15 +08:00
Chao Wang b0b043eda2 list the default enabled admission plugins
Kubernetes-commit: ee96a5638d21f0da111b1106a82976cc59bbbf67
2018-08-06 17:25:24 +08:00
Tripathi 4e7be504bf Support pulling requestheader CA from extension-apiserver-authentication ConfigMap without client CA
This commit prevents extension API server from erroring out during bootstrap when the core
API server doesn't support certificate based authentication for it's clients i.e. client-ca isn't
present in extension-apiserver-authentication ConfigMap in kube-system.

This can happen in cluster setups where core API server uses Webhook token authentication.

Fixes: https://github.com/kubernetes/kubernetes/issues/65724

Kubernetes-commit: db828a44406efe09e2db91e6dc88d1292c9a29e1
2018-07-18 15:07:09 -07:00
Cao Shufeng b40373204e use Audit v1 api and add it to some unit tests
Kubernetes-commit: 716dc87a1095027f9ab08ee59abfffab1d15ec29
2018-07-27 14:06:29 +08:00
Dr. Stefan Schimanski 4c6f8fdc17 apiserver: make loopback logic in SecureServingOptions reusable
Kubernetes-commit: dc0a736d1ea924dfa35ece64cb59d551c2a0b51f
2018-07-04 17:08:23 +02:00
Dr. Stefan Schimanski 55957fdc66 apiserver: add SecureServingOptions.ExternalAddress
Before this the advertised IP (which shows up in the server cert) in case of
listening to loopback was the first host interface IP. This makes self-signed
certs non-constant, such that we cannot use fixtures.

Kubernetes-commit: c1c564fd4d21dd68ea14d7ea678d8619f47fe445
2018-07-06 12:32:01 +02:00
Dr. Stefan Schimanski fa6b67b429 apiserver: use fixtures for self-signed certs in test server
Kubernetes-commit: 7deccb5b7a7c5224d3d90e1391dd22b2d1f1b9b9
2018-07-06 12:04:38 +02:00
Clayton Coleman 9cfed8df8c Convert TestServerRunWithSNI to subtests to isolate flake
This test is flaking - make it easier to pin down where and why by
converting to subtests and making cleanup logic easier. Also turn an
ignored listen error into a "fatal".

Make the test run in parallel to speed up individual runs and hopefully
flush out issues.

Kubernetes-commit: 09463975c379114ef9cd42d3c7efb6254b2c3b33
2018-07-09 21:32:15 -04:00
Dr. Stefan Schimanski ad29bd83ae kube-apiserver: disallow --secure-port 0
Kubernetes-commit: e15ac9eb72c4e105e7a3d84711e5a6056c0f6a48
2018-07-06 12:58:59 +02:00
Dr. Stefan Schimanski 25a00cd3c1 apiserver: get rid of ReadWritePort in config
Kubernetes-commit: e32f380fa5df4361894570787814d0459baada93
2018-07-04 17:01:49 +02:00
Dr. Stefan Schimanski 5746122767 apiserver: don't create self-signed certs with disabled secure serving
Kubernetes-commit: 798535164ae11a7e3c036ed7793aa884942edc88
2018-07-04 19:09:26 +02:00
Cao Shufeng 8fe5561ce7 [trivial] fix option help message.
s/andif/and if/

Kubernetes-commit: 42b93ab7244765dd744257a793b0b9c138146bb3
2018-06-13 09:07:34 +08:00
Mikhail Mazurskiy 0f7bbcadfb Add missing error handling in schema-related code
Kubernetes-commit: bfe313d5f351dfae086a85a97e7103183173e5b5
2018-06-03 14:59:58 +10:00
Tim Allclair 554c4f1986 Fix MaxAge default audit log option
Kubernetes-commit: 3dae49c6977526aba09dc070639ebc789b458411
2018-06-18 14:36:50 -07:00
Dr. Stefan Schimanski 65f0646df4 apiserver: add context to authn/authz kubeconfig errors
Kubernetes-commit: 99eda24de01c8b1b84b54cb763b540de35084ade
2018-06-14 15:30:25 +02:00
Jordan Liggitt 8d6d8aa36e Use actual etcd client for /healthz/etcd checks
Kubernetes-commit: b39cd00982c1696d8ae8afc99931919894044ee2
2018-06-12 14:33:48 -04:00
Victor Garcia 37be5e4c9f Possible cipher suites values and tls versions in help for apiserver and kubelet
Kubernetes-commit: 3dfa22e3fd8c650789176b9f4a8e46ab43ef5ebf
2018-01-24 22:51:27 -05:00