Commit Graph

1170 Commits

Author SHA1 Message Date
Jiajie Yang
ebbd455b24 Restrict service account token metrics to kube-apiserver only. 2020-05-21 15:34:57 -07:00
Kubernetes Prow Robot
7dafbe3ff3
Merge pull request #90391 from johscheuer/improve-error-message-svc-cidr
Improve the error message for the service cidr check
2020-05-18 11:05:37 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Mike Danese
bd290e924f fix some fixture path calculations
Current calculations assume that -trimpath is not passed to go tool
compile, which is not the case for test binaries built with bazel. This
causes issues for integration tests right now but is generally not
correct.

The approach taken here is a bit of a hack but it works on the
assumption that if and only if trimpath is passed, we are running under
bazel. I didn't see a good spot for pkgPath(), so I just copied it
around.
2020-05-12 15:34:55 -07:00
Johannes M. Scheuermann
4c5b46d2ae Move validation in own function with tests 2020-05-08 08:52:34 +02:00
Tomas Nozicka
b22a170d46 Fix client-ca dynamic reload in apiserver 2020-04-29 16:03:09 +02:00
Johannes M. Scheuermann
889648d6e5 Improve the error message for the service cidr check 2020-04-24 07:46:31 +02:00
Kubernetes Prow Robot
15ed3b36d1
Merge pull request #90235 from cici37/addflag
Remove CCM dependency pkg/util/flag
2020-04-22 19:22:14 -07:00
Kubernetes Prow Robot
43cd2ff239
Merge pull request #89549 from happinesstaker/sa-rotate
Monitoring safe rollout of time-bound service account token.
2020-04-22 17:01:58 -07:00
Kubernetes Prow Robot
791b4bbeea
Merge pull request #85266 from serathius/refactor-show-hidden-metric
Refactor show-hidden-metric-for-version flag
2020-04-22 17:01:44 -07:00
Jiajie Yang
ae0e52d28c Monitoring safe rollout of time-bound service account token. 2020-04-22 11:59:16 -07:00
cici37
15c844031f Remove CCM dependency pkg/util/flag 2020-04-22 10:06:11 -07:00
Kubernetes Prow Robot
8b0a7dea1d
Merge pull request #90297 from deads2k/silence-usage
stop printing usage help when the server commands exit
2020-04-20 14:05:49 -07:00
David Eads
871d6dd8bb stop printing usage help when the server commands exit 2020-04-20 08:29:52 -04:00
needkane
97d6f2cfd3 (return []error{} -> return nil) and (update annotation) 2020-04-14 00:05:35 -04:00
Marek Siarkowicz
24321b2d4e Refactor show-hidden-metric-for-version flag 2020-04-08 22:42:14 +02:00
David Eads
45c2f4534c add flag check to ensure that flowcontrol API is present 2020-04-07 15:08:50 -04:00
Kubernetes Prow Robot
0804667ff1
Merge pull request #89151 from jingyih/add_metric_etcd_db_size
apiserver: add a metric exposing etcd database size
2020-03-31 12:37:00 -07:00
jingyih
922ec728de Add a metric exposing etcd database size 2020-03-31 09:02:38 -07:00
Davanum Srinivas
1d057da2f7
Move k8s.io/apiserver/pkg/util/term to k8s.io/component-base/term
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-19 07:18:09 -04:00
Monis Khan
df292749c9
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>
2020-03-11 20:55:47 -04:00
Kubernetes Prow Robot
268d0a1d3a
Merge pull request #85870 from Jefftree/authn-netproxy
Use Network Proxy with Authentication & Authorizer Webhooks
2020-02-28 18:44:39 -08:00
Jefftree
1b38199ea8 pass Dialer instead of egressselector to webhooks 2020-02-27 17:47:23 -08:00
Jefftree
d318e52ffe authentication webhook via network proxy 2020-02-27 17:47:23 -08:00
Jonathan Tomer
711c1e1720 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.
2020-02-27 14:04:37 -08:00
Kubernetes Prow Robot
79b674d827
Merge pull request #84381 from Sh4d1/egress_selector_proxy_v2
Use network proxy for proxy subresources
2020-02-20 04:29:03 -08:00
Kubernetes Prow Robot
77e8c75f32
Merge pull request #87754 from MikeSpreitzer/apf-filter5
Add twice refactored filter and config consumer for API Priority and Fairness
2020-02-13 16:54:46 -08:00
Patrik Cyvoct
6729bfd648
use network proxy for proxy subresources
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2020-02-13 14:42:34 +01:00
Charles Eckman
5a176ac772 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>
2020-02-11 16:23:31 -08:00
Mike Spreitzer
73614ddd4e Added API Priority and Fairness filter and config consumer 2020-02-10 22:54:40 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Tim Allclair
9d3670f358 Ensure testing credentials are labeled as such 2020-02-04 10:36:05 -08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00
Ted Yu
34f0767137 Add flowcontrol to apiVersionPriorities 2020-01-19 14:16:46 -08:00
Jefftree
1289bdaba4 network proxy with admission wh 2020-01-08 15:01:38 -08:00
Jordan Liggitt
3df9e86a4e Remove ability to re-enable serving deprecated APIs 2019-12-13 12:21:33 -05:00
darshanime
f4d1674827 Refactor parsing logic for service IP and ranges, add tests
Signed-off-by: darshanime <deathbullet@gmail.com>
2019-12-05 15:35:20 -05:00
darshanime
fdd25ec968 Fix bug in apiserver service cluster cidr split
Signed-off-by: darshanime <deathbullet@gmail.com>
2019-12-05 15:35:20 -05:00
yue9944882
81471c36b1 [generated] bazels and vendor/modules.txt
[generated] bazels

bazel
2019-12-04 00:49:28 +08:00
yue9944882
168f8f54f0 switch to v1 crd
switch api helper functions to v1 CRD api

switch v1 CRD for apiserver internal

switch to v1 CRD for internal controllers

api storage/validation related changes

move local-defaulting utils private to prevent spreading

boilerplate

keep the subresource status/scale spec nil unless it's enabled

clean up empty space
2019-12-04 00:49:26 +08:00
David Eads
3c1dc89d98 fix kube-apiserver poststarthook additions to avoid duplicating them 2019-11-26 14:05:06 -05:00
Jordan Liggitt
a5760dee81 Add support for --runtime-config=api/beta=false, --feature-gates=AllBeta=false
Allow disabling all beta features and APIs
2019-11-14 14:37:55 -05:00
Kubernetes Prow Robot
64f4be5b32
Merge pull request #84390 from robscott/endpointslice-beta
Promoting EndpointSlices to beta
2019-11-13 17:27:50 -08:00
Kubernetes Prow Robot
02af1dd62c
Merge pull request #85004 from deads2k/dynamic-agg-cert
dynamic reload cluster authentication info for aggregated API servers
2019-11-13 14:50:54 -08:00
Rob Scott
a7e589a8c6
Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
David Eads
3fbfe60ed2 make client authentication optional for test kube-apiserver 2019-11-13 10:25:28 -05:00
David Eads
3aede35b3b dynamic reload cluster authentication info for aggregated API servers 2019-11-13 07:54:27 -05:00
RainbowMango
b2fbdee9bb Deal with auto-generated files.
- Update bazel by hack/update-bazel.sh
2019-11-13 10:32:53 +08:00
RainbowMango
ac0562b00c Add metrics flag to show hidden metrics to kube-apiserver 2019-11-13 10:32:52 +08:00
Kubernetes Prow Robot
94efa988f4
Merge pull request #84813 from deads2k/admission-feature-gates
remove global variable dependency from admission plugins
2019-11-12 10:23:14 -08:00
Jordan Liggitt
7349a824df generated 2019-11-11 17:19:12 -05:00
Jordan Liggitt
d54a70db5c Switch kubelet/aggregated API servers to use v1 subjectaccessreviews 2019-11-11 17:19:11 -05:00
Jordan Liggitt
5ef4fe959a Switch kubelet/aggregated API servers to use v1 tokenreviews 2019-11-11 17:19:10 -05:00
David Eads
675c2fb924 add featuregate inspection as admission plugin initializer 2019-11-08 13:07:40 -05:00
David Eads
be8af0de1b remove exist client hooks 2019-11-06 10:17:19 -05:00
David Eads
7351c86860 publish cluster authentication trust via controller 2019-11-06 10:17:19 -05:00
Igor Zibarev
03dfa1a641 Fix golint issues in pkg/kubeapiserver 2019-11-05 22:25:32 +03:00
Wenjia Zhang
9ead9373f3 Resolve uncompatibility from update: etcd CAFile -> TrustedCAFIle 2019-10-24 14:09:24 -07:00
Kubernetes Prow Robot
46a29a0cc3
Merge pull request #71674 from grayluck/firewall-event-msg
Change XPN firewall change msg. Should be required by security admin
2019-10-14 21:09:51 -07:00
Kubernetes Prow Robot
7ac65858bb
Merge pull request #82371 from deads2k/cert-reload-delegated
add ability to authenticators for dynamic update of certs for delegated authn
2019-10-04 08:50:04 -07:00
Kubernetes Prow Robot
5fbda60c14
Merge pull request #82077 from deads2k/poststart
add ability to pre-configure poststarthooks for apiservers
2019-10-03 08:16:10 -07:00
Jordan Liggitt
8ef4566cef Limit YAML/JSON decode size 2019-10-02 21:52:19 -04:00
David Eads
51195dd860 add ability to authenticators for dynamic update of certs 2019-10-01 09:50:20 -04:00
David Eads
f14f4c933e add ability to pre-configure poststarthooks for apiservers 2019-10-01 09:08:18 -04:00
yankaiz
bd03c3a096 Change XPN firewall change message, should be required by security admin.
Add l7lbSrcRngsFlag to gce_loadbalancer.go so that ingress can have
fewer source ranges for l7 health checks.
2019-09-30 11:19:42 -07:00
Kubernetes Prow Robot
67d928acdc
Merge pull request #82096 from logicalhan/version-deletion
remove pkg/version and some of redundant copies of it
2019-09-17 14:27:16 -07:00
Kubernetes Prow Robot
3a19f1e80b
Merge pull request #82472 from draveness/feature/remove-feature-gates-in-1-17
feat: cleanup several GA feature flags which should be removed in 1.17
2019-09-17 06:58:24 -07:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
Kubernetes Prow Robot
7ec4f4b4a6
Merge pull request #82391 from jiachengxu/apiserver-typo
Fix a typo in cmd/kube-apiserver.
2019-09-11 15:27:23 -07:00
Kubernetes Prow Robot
1d016cc1d3
Merge pull request #81668 from darshanime/remove_default_service_cidr
Deprecate default service IP CIDR
2019-09-10 14:31:45 -07:00
draveness
14dc59ee54 feat: remove EnableAggregatedDiscoveryTimeout feature gate 2019-09-09 09:55:54 +08:00
Jiacheng Xu
637badc1f0
fix a typo in cmd/kube-apiserver. 2019-09-05 23:00:36 +02:00
Kubernetes Prow Robot
c86da8e2c1
Merge pull request #82048 from cheftako/kas-np4
Add support for konnectivity service to the etcd3 client.
2019-08-30 16:15:28 -07:00
Walter Fender
edbb0fa2fe 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.
2019-08-30 10:31:53 -07:00
David Eads
5521bf27c5 add temporary feature gate to allow disabling aggregated discovery timeout 2019-08-30 08:30:08 -04:00
darshanime
aef96c34a9 Remove default service cidr
Signed-off-by: darshanime <deathbullet@gmail.com>
2019-08-30 11:14:25 +05:30
Kubernetes Prow Robot
7acb066dbc
Merge pull request #81969 from logicalhan/livez
add `/livez` endpoint for liveness probing on the kube-apiserver
2019-08-29 19:56:31 -07:00
Han Kang
aa1b2d6d35 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
2019-08-29 14:13:19 -07:00
Kubernetes Prow Robot
550fb1bfc3
Merge pull request #79386 from khenidak/phase2-dualstack
Phase 2 dualstack
2019-08-28 20:39:56 -07:00
Kubernetes Prow Robot
6c9f26ca3a
Merge pull request #80766 from robscott/discovery-api
Adding Discovery API for EndpointSlice
2019-08-28 14:44:09 -07:00
Khaled Henidak(Kal)
c27e0b029d phase 2: generated items 2019-08-28 16:11:46 +00:00
Khaled Henidak(Kal)
93c06821e6 Phase 2: service and endpoint processing 2019-08-28 15:59:43 +00:00
Han Kang
466980dd74 migrate kube-apiserver metrics to stability framework 2019-08-27 12:45:01 -07:00
Rob Scott
f80cee9280
Adding discovery/v1alpha1 API for EndpointSlices 2019-08-26 14:50:00 -07:00
Benjamin Elder
5a3301a59d s/nolegacyproviders/providerless/ 2019-08-22 15:30:56 -07:00
Benjamin Elder
ece112524b hack/update-bazel.sh 2019-08-22 14:53:35 -07:00
Benjamin Elder
101de4a677 make it possible to start kube-api-server and kube-controller-manager without legacy cloud provider flags 2019-08-22 14:53:35 -07:00
Kubernetes Prow Robot
8dea3310e5
Merge pull request #81376 from logicalhan/health-checks
rename healthz methodNames to be more consistent w/ present day usages
2019-08-22 03:48:32 -07:00
Jordan Liggitt
aa05715c0e generated 2019-08-16 13:13:40 -04:00
Jordan Liggitt
6278447bde CRD v1: install/register types 2019-08-15 12:26:13 -04:00
Han Kang
2e23788fda rename healthz methodNames to be more consistent w/ present day usages 2019-08-13 12:52:30 -07:00
Kubernetes Prow Robot
9690201481
Merge pull request #81094 from andrewsykim/deprecate-cloud-provider-gce-lb-src-cidrs
also deprecate --cloud-provider-gce-lb-src-cidrs flag in kube-apiserver
2019-08-08 07:59:58 -07:00
Kubernetes Prow Robot
4c315aa8d9
Merge pull request #78543 from cheftako/kas-np3
Get network-proxy working with GCE.
2019-08-07 14:44:44 -07:00
Andrew Sy Kim
651633cb70 also deprecate --cloud-provider-gce-lb-src-cidrs flag from kube-apiserver
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-08-07 14:48:40 -04:00
Walter Fender
ebb65c5f4c 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
2019-08-06 23:09:49 -07:00
Kubernetes Prow Robot
663796e624
Merge pull request #78345 from obitech/fix_golint_pkg_kubelet_stats_client
Fix golint pkg/kubelet/stats/client.go
2019-08-06 13:14:49 -07:00
Clayton Coleman
33521b41d4
Disable gzip compression in core control plane components
On local networks (such as the typical connection path between
control plane components) gzip compression increases CPU use and
end to end p99 latency rather than decreasing it. Disable compression
within the control plane components like a 1.15 cluster would be
configured.
2019-08-02 16:18:15 -04:00
yue9944882
3b1624f0cc remove kube-aggregator/pkg/client/*
use v1 api

[DO NOT REVIEW] bazel changes

code-gen script changes

update hack/update-vendor

remove useless interface type cast
2019-07-16 23:11:15 +08:00
Kubernetes Prow Robot
b45bfef437
Merge pull request #78473 from xichengliudui/deleteTODO
delete TODO: remove when we stop supporting the legacy group version
2019-07-09 06:34:03 -07:00
Dr. Stefan Schimanski
f82bc712de aggregator: wire OpenAPI correctly into PrepareRun flow 2019-07-08 13:59:00 +02:00
Dr. Stefan Schimanski
7c4329ed45 apiserver: chain delegated PrepareRun 2019-07-08 12:20:20 +02:00
Mike Danese
bc59028b09 Create a service account Getter when TokenRequest is enabled
Fixes a nil panic when --service-account-lookup=false and TokenRequest
is enabled.
2019-07-02 16:56:31 -07:00
Han Kang
54dcf5c9c4 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
2019-06-17 11:16:13 -07:00
Kubernetes Prow Robot
042b0d7e60
Merge pull request #77540 from SataQiu/fix-apiserver-20190507
Mark deprecated kubelet-read-only-port
2019-06-14 00:28:21 -07:00
Clayton Coleman
26a6cdda86
Set integration tests to use distinct namespaces
TestWatchBasedManager was racing with the default namespace creation.
To fix that flake and to ensure integration tests using a shared etcd
don't accidentally overlap in the future, move the three main tests
using the default namespace to separate namespaces, and have
TestWatchBasedManager create that namespace before it runs.

Make StartTestServer wait for default namespace creation, which will
reduce other flakes until future changes completely remove use of default
namespace.

From a failed integration run:

	watch_manager_test.go:66: namespaces "default" not found
	watch_manager_test.go:66: namespaces "default" not found
	watch_manager_test.go:66: namespaces "default" not found
2019-05-30 19:11:50 -04:00
Kubernetes Prow Robot
6e78282a82
Merge pull request #77611 from rohitsardesai83/deprecate-logs-handler-apiserver
Fix 77515 Deprecate the option to enable the log handler for apiserver
2019-05-29 05:32:47 -07:00
aaa
a55b9301da delete TODO: remove when we stop supporting the legacy group version 2019-05-29 06:04:16 -04:00
Rohit Sardesai
a50273f9d4 Fix 77515 Deprecate the option to enable the log handler for apiserver 2019-05-28 15:20:40 +05:30
obitech
2426ff8ae0 Change to EnableHTTPS in kube-apiserver options 2019-05-27 22:03:21 +02:00
Kubernetes Prow Robot
c6338cbb58
Merge pull request #76720 from xichengliudui/constant-block
Using const() defines constants together
2019-05-22 15:14:25 -07:00
Jordan Liggitt
0b88095a17 Switch admission webhook test to work with shared etcd 2019-05-17 09:54:14 -07:00
Stephen Chan
7cbe2d6c5f move signal handling for hyperkube apiserver and kubelet commands out of hyperkube main command 2019-05-09 21:27:44 -07:00
SataQiu
5724d14d54 mark deprecated kubelet-read-only-port 2019-05-07 19:03:12 +08:00
Jordan Liggitt
90cd672ab6 Enable paging by default in etcd options, by feature flag in sample-apiserver 2019-04-30 17:49:34 -04:00
aaa
5cb91e5ae3 Using const() defines constants together
Signed-off-by: aaa <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: xichengliudui <1693291525@qq.com>

update pull request
Signed-off-by: aaa <1693291525@qq.com>

update pull request reset marshal.go
2019-04-27 11:07:01 -04:00
Han Kang
f7c23b1c1d cleanup of reflector metric code (finish removing unused code) 2019-03-25 15:12:09 -07:00
Chao Xu
887cb93d8d generated BUILD
generated proto
2019-03-11 10:26:56 -07:00
Chao Xu
3b618af0d4 Expose storage version hash 2019-03-11 10:26:56 -07:00
Tim Allclair
820a1dc96b Add node.k8s.io/v1beta1 API 2019-03-07 11:57:12 -08:00
Tim Allclair
63f61a6714 Migrate RuntimeClass to internal API 2019-03-07 11:07:54 -08:00
Dr. Stefan Schimanski
3b504c10c2 openapi: remove postprocessing for old paths, deprecated in 1.9 2019-02-26 14:17:44 +01:00
Kubernetes Prow Robot
b5566c7818
Merge pull request #71896 from awly/client-go-keyutil
client-go: extract new keyutil package from util/cert
2019-02-23 01:43:16 -08:00
Kubernetes Prow Robot
3afa003126
Merge pull request #73555 from bsalamat/priority_to_ga
Graduate PriorityClass API to GA
2019-02-22 16:14:49 -08:00
Bobby (Babak) Salamat
453498fe2c Graduate PriorityClass to GA 2019-02-22 10:51:13 -08:00
Jordan Liggitt
8c28d3f63c Add networking.k8s.io/v1beta1 Ingress 2019-02-20 16:41:14 -05:00
Andrew Lytvynov
18458392ca 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
2019-02-19 09:48:59 -08:00
Kubernetes Prow Robot
0ffd59e403
Merge pull request #74154 from mbohlool/gimli
Use Request Object interfaces instead of static scheme that is more appropriate for CRDs
2019-02-19 07:21:53 -08:00
David Eads
ad740bbba5 allow apiservers to override the list of decorators 2019-02-18 14:47:09 -05:00
Mehdy Bohlool
cebb4ee2ac Remove the propagated scheme from the Admission chain 2019-02-16 13:28:47 -08:00
Marek Counts
160ed26c20 autogen files to support new project structure. 2019-02-15 10:29:31 -05:00
Marek Counts
7744f90830 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.
2019-02-15 10:28:13 -05:00
Dr. Stefan Schimanski
af17cff6b0 kube-aggregator: rename New{Auto -> CRD}RegistrationController 2019-02-14 10:21:13 +01:00
Kubernetes Prow Robot
29403174fb
Merge pull request #73805 from caesarxuchao/resource-size-limit
Adding a limit on the size of request body the apiserver will decode for write operations
2019-02-12 15:10:57 -08:00
Kubernetes Prow Robot
0ae81c986a
Merge pull request #67678 from caesarxuchao/remove-storage-versions-flag
Remove storage versions flag
2019-02-11 17:40:27 -08:00
Chao Xu
27166e48b8 Loosing the request body size limit to 100MB to account for the size
ratio between json and protobuf.
2019-02-11 11:32:11 -08:00
Chao Xu
b971b12d3c Adding a limit on the maximum bytes accepted to be decoded in a resource
write request.
2019-02-07 11:07:02 -08:00
Kubernetes Prow Robot
b00b5d4ac0
Merge pull request #73713 from caesarxuchao/bump-json-patch-again
Importing the latest json patch and set the accumulated copy size limit
2019-02-06 21:13:45 -08:00
Chao Xu
f001f9e1db Set the maximum size increase the copy operations in a json patch can cause 2019-02-06 14:15:20 -08:00
danielqsj
2b8898b95e remove flag repair-malformed-updates 2019-02-02 20:54:35 +08:00
David Eads
b1f67e9330 catch some unhandled errors 2019-02-01 15:16:23 -05:00
Chao Xu
bed7696876 generated BUILD files 2019-01-30 13:28:48 -08:00
Chao Xu
1281243860 Remove the --storage-versions flag from kube-apiserver.
The storage version now is solely decided by the
scheme.PrioritizedVersionsForGroup(). For cohabitating resources, the storage
version will be that of the overriding group as returned by
storageFactory.getStorageGroupResource().
2019-01-30 13:28:48 -08:00
Jordan Liggitt
dc1fa870bf Remove alpha InitializerConfiguration types, Initializers admission plugin 2019-01-23 11:37:39 -05:00
Patrick Barker
34d57f295f adds dynamic audit integration test generated 2019-01-16 16:27:51 -08:00
Patrick Barker
d995047366 adds dynamic audit integration test 2019-01-16 16:24:02 -08:00
Jordan Liggitt
9229399bd6 Remove build/verify scripts for swagger 1.2 API docs, API server swagger ui / swagger 1.2 config 2019-01-15 13:33:06 -05:00
Dr. Stefan Schimanski
7b242533a2 apiserver: separate transport setting from storagebackend.Config 2019-01-02 12:52:38 +01:00
Kubernetes Prow Robot
6e182ed5ea
Merge pull request #71816 from liggitt/service-account-lookup
Look up service accounts from informer before trying live lookup
2018-12-31 21:18:55 -08:00
wojtekt
73d14dede6 Promote Lease API to v1 2018-12-20 15:39:57 +01:00
Jordan Liggitt
a9dc919f82 Look up service accounts from informer before trying live lookup 2018-12-06 16:48:39 -05:00
k8s-ci-robot
86d4d95e0d
Merge pull request #70426 from sttts/sttts-testserver-run-errors
testservers: return Run method errors correctly
2018-11-29 00:47:45 -08:00
Jay Lim
7fbdcf889a kube-apiserver: fix missing global flags for --help
Signed-off-by: Jay Lim <jay@imjching.com>
2018-11-21 12:30:09 -05:00
Patrick Barker
eb89d3dddd adds dynamic audit configuration 2018-11-14 17:54:06 -07:00
Mike Danese
20bad760fc cleanup error handling in apiserver opts validation 2018-11-13 17:27:13 -08:00
Mike Danese
06935e1c90 split TokenRequest initialization out of run and into complete and validate 2018-11-13 17:27:13 -08:00
Mike Danese
766aab509a dedup APIAudiences config in kube-apiserver, use GenericConfig field 2018-11-13 11:07:31 -08:00
Davanum Srinivas
954996e231
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
2018-11-10 07:50:31 -05:00
Mehdy Bohlool
e2ca575d0f CRD Conversion 2018-11-09 15:57:35 -08:00
Dr. Stefan Schimanski
4860f8732a testservers: return Run method errors correctly 2018-11-06 15:14:24 +01:00
walter
2af982abb9 Fixes lint errors in kubeapiserver packages
Fixes lint errors in kubeapiserver/admission, kubeapiserver/authorizer,
kubeapiserver/authenticator. Also enables lint testing of these
directories.
Fixed go format.
Fixed changes from config.
2018-11-04 17:22:41 -08:00
zuoxiu.jm
7f608eb5df prune internal informer from kubeapiserver constructor 2018-10-29 11:30:44 +08:00
yue9944882
6a8faa6e40 replace contrustor of ad controller with config.complete.new flow
review:
1. import order
2. only set nil field on complete
3. replace hardcoded default namespace
2018-10-26 11:49:37 +08:00
Kim Min
79599ac419 Prune internal clientset/informer from kubeapiserver admission initializer (#70167)
* externalize pv resize admission controller

* externalize podtolerationrestriction admission controller

* externalize podnodeselector admission controller

* remove internal clientset/informer from kubeapiserver admission initializer

* minor change: fixes scheduler integration test compiliation
2018-10-24 14:47:16 -07:00
zuoxiu.jm
38ddb4413a update token authn constructor 2018-10-24 16:56:38 +08:00
Mike Danese
371b1e7fed promote --service-account-api-audiences to top level kube-apiserver config
The service account authenticator isn't the only authenticator that
should respect API audience. The authentication config structure should
reflect that.
2018-10-22 18:21:37 -07:00
Jordan Liggitt
c8db31b84a etcd2 code cleanup, remove deserialization cache 2018-10-15 22:17:44 -04:00
Jordan Liggitt
cff79c5421 Remove deprecated --etcd-quorum-read flag 2018-10-08 21:56:01 -04:00
k8s-ci-robot
0f17e9ade6
Merge pull request #69386 from cblecker/go-1.11
Update to go1.11.1
2018-10-05 17:35:51 -07:00
Christoph Blecker
97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Walter Fender
f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
k8s-ci-robot
0805860dba
Merge pull request #67870 from yue9944882/refactor/externalize-resource-quota-admission-controller
Externalize resource quota admission controller & controller reconciliation
2018-09-25 02:41:40 -07:00
Kubernetes Submit Queue
14eb029fba
Merge pull request #67798 from mbohlool/crd_refactoring
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Refactor admission webhook client code to a apiserver/pkg/util package

As part of #67006 This refactoring enable us to share code between admission webhooks and CRD conversion webhooks.

@deads2k @lavalamp @sttts @kubernetes/sig-api-machinery-misc
2018-08-31 06:16:28 -07:00
Mehdy Bohlool
1d8340bde5 update generated files 2018-08-31 16:07:15 +10:00
Mehdy Bohlool
5652d5cffa Refactor addmission webhook hook client to a util package 2018-08-31 16:07:15 +10:00
Mike Dame
77d7f9cfa2 Generate files and modifications for autoscaling/v2beta2 and custom_metrics/v1beta2 2018-08-27 11:07:53 -04:00
yue9944882
a4f33a6a9f align imports for cmd 2018-08-27 21:50:15 +08:00
Jordan Liggitt
70f9ca0c1a
Set paging feature correctly for aggregator and crd storage 2018-08-25 09:51:34 -04:00
Kubernetes Submit Queue
166a1356e8
Merge pull request #62420 from mikedanese/jose-bump
Automatic merge from submit-queue (batch tested with PRs 67707, 62420). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

svcacct: support jose.OpaqueSigner and push errors to token generator creation

```release-note
NONE
```
2018-08-23 15:39:59 -07:00
Mike Danese
e68f14a249 jwt: support opaque signer and push errors to token generator creation 2018-08-23 12:21:56 -07:00
yue9944882
f624a4efb8 externalize node admission
fixes internal pod annotation reference

completely strip internal informers from authz initialization
2018-08-21 23:33:03 +08:00
Dr. Stefan Schimanski
d787213d1b kube-apiserver: switch apiserver's DeprecatedInsecureServingOptions 2018-08-17 08:56:47 +02:00
Dr. Stefan Schimanski
1d9a896066 apiserver: move controller-manager's insecure config into apiserver 2018-08-17 08:56:46 +02:00
Kubernetes Submit Queue
87e7b9fc4c
Merge pull request #67223 from tallclair/audit-log
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Synchronous & unbatched audit log writes

**What this PR does / why we need it**:
When enabling buffered audit log file writes to reduce latency under high load, we shouldn't be batching the writes, as the large data write can have an inverse (though unpredictable) impact. Additionally, batched audit log writes should not be done asynchronously, as this just creates lock contention on the log writer.

This is a clean-ed up version of https://github.com/kubernetes/kubernetes/pull/61217

**Which issue(s) this PR fixes**
Fixes #61932 

**Release note**:

```release-note
NONE
```

/sig auth
/priority important-soon
/kind bug
/milestone v1.12
2018-08-16 06:29:18 -07:00
Kubernetes Submit Queue
1f86c1cf26
Merge pull request #61212 from charrywanganthony/duplicated_import
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove duplicated import

**Release note**:

```release-note
NONE
```
2018-08-14 20:18:00 -07:00
Tim Allclair
c9670d0652
Synchronous & unbatched audit log writes 2018-08-14 10:20:35 -07:00
Kubernetes Submit Queue
15c2dd906e
Merge pull request #66888 from yue9944882/refactor/promote-informers-into-master-cfg
Automatic merge from submit-queue (batch tested with PRs 66394, 66888, 66932). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Promote internal/external informers into master.Config

**Release note**:

```release-note
NONE
```
xref #66386

Shorten `BuildGenericConfig`'s return list. 
Put the internal and external informers into master.Config. Previous art:


[60614d5cdc/staging/src/k8s.io/apiserver/pkg/server/config.go (L196))
2018-08-08 07:00:08 -07:00
yue9944882
6bac6fafa0 promote informers into master.Config
review:

1. move informers into master extra config
2. move one post start hook into New()

fixes npe from master integration test
2018-08-08 09:35:45 +08:00
Kubernetes Submit Queue
5ed156d67b
Merge pull request #66196 from tanshanshan/fixspell1
Automatic merge from submit-queue (batch tested with PRs 66196, 67016, 66807, 67023). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix spelling  mistakes

**What this PR does / why we need it**:
fix spelling  mistakes

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-07 11:44:02 -07:00
Kubernetes Submit Queue
db9545e69e
Merge pull request #66386 from yue9944882/refactor/etcd-options-config
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor storage factory config with Complete().New() flow

**What this PR does / why we need it**:

1. Split `BuildStorageFactory` constructor into `Complete().New()` flow to build an instance for etcd storage.

2. Put `EtcdOptions` and `StorageSerializationOptions` into a `StorageFactoryOptions` for a more reasonable structured config object.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

Generally, my idea is to split the huge code in [https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go](https://github.com/kubernetes/kubernetes/blob/master/cmd/kube-apiserver/app/server.go) into somewhere else making more sense :)

**Release note**:

```release-note
NONE
```
2018-08-06 20:26:02 -07:00
yue9944882
e8ae7887a5 This is a combination of 3 commits.
refactor storage factory options

review: minor changes

1. make storage factory config complete with options
2. make BuildGenericConfig private

review: move codes
2018-08-06 22:29:10 +08:00
Dr. Stefan Schimanski
42d533e40c apiserver: output flags in logical sections 2018-08-06 08:55:09 +02:00
Chao Wang
39a4730db6 remove duplicated import 2018-08-01 13:27:42 +08:00
tanshanshan
f68af9e584 fix spell 2018-07-14 10:05:56 +08:00
Kubernetes Submit Queue
60ca804515
Merge pull request #65832 from sttts/sttts-apiserver-reusable-loopback-logic
Automatic merge from submit-queue (batch tested with PRs 65832, 66160, 66145). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiserver: make loopback logic in SecureServingOptions reusable

For reuse in other components this PR separates the loopback logic from the GenericApiServer config.
2018-07-13 13:22:04 -07:00
Dr. Stefan Schimanski
dc0a736d1e apiserver: make loopback logic in SecureServingOptions reusable 2018-07-13 13:04:57 +02:00
Dr. Stefan Schimanski
c1c564fd4d 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.
2018-07-13 09:49:54 +02:00
Dr. Stefan Schimanski
7deccb5b7a apiserver: use fixtures for self-signed certs in test server 2018-07-13 09:49:54 +02:00
Dr. Stefan Schimanski
e15ac9eb72 kube-apiserver: disallow --secure-port 0 2018-07-09 14:03:08 +02:00
Dr. Stefan Schimanski
42f1e81488 apiextensions-apiserver: add pkg/cmd/server/testing pkg for integration bootstrapping
In analogy to kube-apiserver.
2018-07-05 17:34:16 +02:00
Kubernetes Submit Queue
6d3bba7391
Merge pull request #64246 from wojtek-t/lease_object_type
Automatic merge from submit-queue (batch tested with PRs 64246, 65489, 65443). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create "Lease" API in the new "coordination.k8s.io" api group

Part of "Efficient Node heartbeats" KEP:
https://github.com/kubernetes/community/blob/master/keps/0009-node-heartbeat.md

Part of: https://github.com/kubernetes/kubernetes/issues/14733

```release-note
NONE
```
2018-06-27 08:17:10 -07:00
wojtekt
c79b54db9f Enable coordination api group 2018-06-27 13:30:13 +02:00
Kubernetes Submit Queue
2da49321e6
Merge pull request #63653 from WanLinghao/token_expiry_limit
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add limit to the TokenRequest expiration time

**What this PR does / why we need it**:
A new API TokenRequest has been implemented.It improves current serviceaccount model from many ways.
This patch adds limit to TokenRequest expiration time.


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #63575

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-06-27 00:31:08 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Wen Gao
e12dea4e24 Typo fix: unqalified=>unqualified 2018-06-21 09:02:18 +08:00
WanLinghao
f16470c3f1 This patch adds limit to the TokenRequest expiration time. It constrains a TokenRequest's expiration time to avoid extreme value which could harm the cluster. 2018-06-14 09:31:50 +08:00
Marko Mudrinić
2bf66c377d
apiextensions-apiserver: add establishing controller to avoid race between established and CRs actually served 2018-05-29 13:46:47 +02:00
Andrew McDermott
9cbd54018f Remove signal handler registration from pkg/kubelet
The goal of this change is to remove the registration of signal
handling from pkg/kubelet. We now pass in a stop channel.

If you register a signal handler in `main()` to aid in a controlled
and deliberate exit then the handler registered in `pkg/kubelet` often
wins and the process exits immediately. This means all other signal
handler registrations are currently racy if `DockerServer.Start()` is
directly or indirectly invoked.

This change also removes another signal handler registration from
`NewAPIServerCommand()`; a stop channel is now passed to this
function.
2018-05-24 20:44:12 +01:00
Jordan Liggitt
43551e8208
Correctly identify types served in the kube-apiserver openapi doc 2018-05-22 20:57:18 -04:00
Mikhail Mazurskiy
5e8e570dbd
Use Dial with context 2018-05-19 08:14:37 +10:00
Kubernetes Submit Queue
a1b54f3c99
Merge pull request #63100 from ravisantoshgudimetla/priority-beta-api
Automatic merge from submit-queue (batch tested with PRs 55511, 63372, 63400, 63100, 63769). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create pkg/scheduling/apis/v1beta1 and move priorityClass to beta 

**What this PR does / why we need it**:
This is for creating pkg/apis/scheduling/v1beta1 so that priorityClasses could be moved to beta.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of #57471

**Special notes for your reviewer**:
/cc @bsalamat @aveshagarwal 

**Release note**:

```release-note
The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`
```
2018-05-14 14:35:21 -07:00
ravisantoshgudimetla
1db5990013 Move scheduling api to beta 2018-05-12 02:01:04 -04:00
Jordan Liggitt
1245601659
Make discovery refresh period less aggressive 2018-05-10 07:53:46 -04:00
David Eads
c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
David Eads
dd97a7bc59 move client based restmappers to client-go 2018-05-08 08:11:56 -04:00
Kubernetes Submit Queue
31511f9e24
Merge pull request #63383 from liggitt/lease-reconciler
Automatic merge from submit-queue (batch tested with PRs 63315, 63383, 63318, 63439). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Re-enable lease reconciler, fix shutdown race

Fixes #63378
Fixes #57617

* Fixes the openapi script to wait for the apiserver on shutdown (like all the other scripts do)
* Fixes the apiserver shutdown to not hang forever if the kubernetes service reconciler cannot persist to etcd
* Readds https://github.com/kubernetes/kubernetes/pull/58474 to make the default the lease reconciler

```release-note
kube-apiserver: the default `--endpoint-reconciler-type` is now `lease`. The `master-count` endpoint reconciler type is deprecated and will be removed in 1.13.
```
2018-05-04 12:41:09 -07:00
Kubernetes Submit Queue
4e3efbe364
Merge pull request #61455 from liggitt/uid-conflict
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate repair-malformed-updates flag, move object meta mutation into BeforeCreate

closes #23297

```release-note
NONE
```
2018-05-03 13:41:07 -07:00
Ryan Phillips
e3e31ecd40
apiserver: change default reconciler to LeaseEndpoint
Fixes #57617
2018-05-02 22:16:23 -04:00
Jordan Liggitt
0cffc7eef5
Revert "apiserver: change default reconciler to LeaseEndpoint"
This reverts commit 0227534e99.
2018-05-02 18:46:18 -04:00
Ryan Phillips
0227534e99 apiserver: change default reconciler to LeaseEndpoint
Fixes #57617
2018-04-30 10:06:44 -05:00
Kubernetes Submit Queue
bbcd21e0ab
Merge pull request #60890 from rphillips/tests/lease_endpoint
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apiserver: master count and lease endpoint test

**What this PR does / why we need it**: Adds a test to make sure master count and lease endpoint reconcilers work well together, so we can bump LeaseEndpoint to beta. Based on Jordan's comment https://github.com/kubernetes/kubernetes/pull/58474#issuecomment-369954890. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Issue: #57617
Followup PR: #58474

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/cc @kubernetes/sig-cluster-lifecycle-api-reviews @kubernetes/sig-cluster-lifecycle-api-reviews
2018-04-27 16:54:16 -07:00
Jordan Liggitt
7f840f4441
Deprecate repair-malformed-updates flag, move object meta mutation into BeforeCreate 2018-04-27 17:26:39 -04:00
Ryan Phillips
efe19e4acb master count and lease endpoint tests 2018-04-27 13:03:31 -05:00
David Eads
e2fc5cf259 remove versioning interface 2018-04-27 07:56:42 -04:00
David Eads
a68c57155e remove KUBE_API_VERSIONS 2018-04-26 08:27:49 -04:00
David Eads
e7fbbe0e3c eliminate indirection from type registration 2018-04-25 09:02:31 -04:00
Kubernetes Submit Queue
bf1974c83f
Merge pull request #61711 from crassirostris/audit-size-limiting
Automatic merge from submit-queue (batch tested with PRs 62655, 61711, 59122, 62853, 62390). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Implemented truncating audit backend

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

Introduces an optional truncating backend, disabled by default, that estimates the size of audit events and truncates events/split batches based on the configuration.

/cc @sttts @tallclair @CaoShuFeng @ericchiang 

```release-note
Introduce truncating audit backend that can be enabled for existing backend to limit the size of individual audit events and batches of events.
```
2018-04-24 13:28:17 -07:00
Kubernetes Submit Queue
a0f9412361
Merge pull request #62810 from liggitt/request-mapper
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove request context mapper

http.Request now allows setting/retrieving a per-request context, which removes the need for plumbing a request-context mapper throughout the stack

In addition to being way simpler, this has the benefit of removing a potentially contentious lock object from the handling path

This PR:
* removes RequestContextMapper
* converts context fetchers to use `req.Context()`
* converts context setters to use `req = req.WithContext(...)`
* updates filter plumbing in two places (audit and timeout) to properly return the request with modified context
* updates tests that used a fake context mapper to set the context in the request instead

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

```release-note
NONE
```
2018-04-23 13:01:14 -07:00
Jordan Liggitt
fe23fa3eee
Ensure service routing resolves kubernetes.default.svc correctly 2018-04-20 12:26:38 -04:00
Jordan Liggitt
8ea88a5092
Remove request context mapper 2018-04-18 17:03:31 -04:00
Monis Khan
300751393b
Use a dynamic RESTMapper for admission plugins
This change updates the REST mapper used by all admission plugins to
be backed by cached discovery information.  This cache is updated
every ten seconds via a post start hook and will not attempt to
update on calls to RESTMapping.  It solely relies on the hook to
keep the cache in sync with discovery.

This prevents issues with the OwnerReferencesPermissionEnforcement
admission plugin when it is used with custom resources that set
blockOwnerDeletion.

Signed-off-by: Monis Khan <mkhan@redhat.com>
2018-04-17 09:59:41 -04:00
Kubernetes Submit Queue
7c0df535e2
Merge pull request #62545 from php-coder/psp_move_registry_to_policy
Automatic merge from submit-queue (batch tested with PRs 62650, 62303, 62545, 62375). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move podsecuritypolicy registry to policy package

**What this PR does / why we need it:**
This is a part of the PSP migration from extensions to policy API group. This PR moves registry to policy package and changes preferred storage format to policy/v1beta1

**Which issue(s) this PR fixes:**
Addressed to https://github.com/kubernetes/features/issues/5
2018-04-16 13:56:10 -07:00
Slava Semushin
ff636f25c0 Move podsecuritypolicy registry to policy package. 2018-04-16 17:21:52 +02:00
hzxuzhonghu
8f98af9459 Show deprecated kube-apiserver flags 2018-04-16 21:20:06 +08:00
Mik Vyatskov
52fae99130 Implemented truncating audit backend
Signed-off-by: Mik Vyatskov <vmik@google.com>
2018-04-10 19:16:18 +02:00
Dr. Stefan Schimanski
9f906618f0 apiserver: enforce shared RequestContextMapper in delegation chain 2018-04-05 14:41:56 +02:00
hzxuzhonghu
8cce8bdc85 make kube-apiserver ServerRunOptions setdefault and Validate before use 2018-04-04 11:19:55 +08:00
Kubernetes Submit Queue
fb795a3b80
Merge pull request #61404 from hzxuzhonghu/fix-webhook-crd-bug
Automatic merge from submit-queue (batch tested with PRs 61404, 61025). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

bug fix: create/update CRD panic when mutating webhook configured

apiextentions apiserver use its own scheme to create a admission chain before creating the apiextensions apiserver config.
Fixes #61355

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-03 07:31:04 -07:00
hzxuzhonghu
4c26831147 apiserver's webhook admission use its own scheme 2018-04-03 20:42:38 +08:00
David Eads
ee5bc39c4c remove kube-apiserver option that is always force to true 2018-04-02 12:19:34 -04:00
Cao Shufeng
24cf9f3041 fix flag message about TokenRequest 2018-03-31 17:07:49 +08:00
Slava Semushin
e976c4e233 Include original error in the error message. 2018-03-27 15:50:23 +02:00
Kubernetes Submit Queue
2fdcfeae51
Merge pull request #61166 from hzxuzhonghu/authz-flag-validate
Automatic merge from submit-queue (batch tested with PRs 60519, 61099, 61218, 61166, 61714). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kube-apiserver add BuiltInAuthorizationOptions validation

Validate BuiltInAuthorizationOptions after flags parsed. 

**Release note**:

```release-note
NONE
```
2018-03-26 23:20:14 -07:00
hzxuzhonghu
755df0461d validate authorization flags in BuiltInAuthorizationOptions.Validate 2018-03-26 20:37:02 +08:00
Kubernetes Submit Queue
02856b6656
Merge pull request #60996 from deads2k/server-09-metrics
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update metrics to true like it is for kube-apiserver

The kube-apiserver always hardcoded to true, but nothing else knew too.  I changed the default to true (I can't think of why you wouldn't want it even if you don't often use it).

@kubernetes/sig-api-machinery-bugs 
@MikeSpreitzer see if this fixes you?
2018-03-25 04:33:24 -07:00
David Eads
456fd386dc update metrics to true like it is for kube-apiserver 2018-03-22 10:27:31 -04:00
Mik Vyatskov
ad25d1f9ec Make advanced audit output version configurable.
Signed-off-by: Mik Vyatskov <vmik@google.com>
2018-03-21 17:29:05 +01:00
Kubernetes Submit Queue
691a7d4358
Merge pull request #60759 from hzxuzhonghu/etcd-flag-validate
Automatic merge from submit-queue (batch tested with PRs 60759, 60531, 60923, 60851, 58717). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

validate EtcdOptions.EtcdServersOverrides in EtcdOptions.Validate

move `EtcdOptions.EtcdServersOverrides` validation from `BuildStorageFactory` to `EtcdOptions.Validate`, which fails fast in kube-apiserver startup.

**Release note**:

```release-note
NONE
```
2018-03-20 15:34:27 -07:00
hzxuzhonghu
f380ac8cec move EtcdServersOverrides to EtcdOptions flags validate 2018-03-06 18:38:18 +08:00
hzxuzhonghu
0feecc376c apiserver clean code 2018-03-06 10:31:50 +08:00