Commit Graph

896 Commits (1f7e9fd9a2b31ee21babef2cbdd18caeb8c14cdc)

Author SHA1 Message Date
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
Nikhita Raghunath 6e47ba1fde Add sig/api-machinery label to apimachinery OWNERS files 2018-08-20 18:46:47 +05:30
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
Cao Shufeng 4c97fd4590 add CaoShuFeng as a reviewer of kube-apiserver 2018-04-17 14:32:05 +08: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
hzxuzhonghu bcb4169a59 add myself to apiserver owners 2018-04-11 16:25:26 +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
Kubernetes Submit Queue 209cdd9048
Merge pull request #60237 from crassirostris/audit-use-buffered-backend
Automatic merge from submit-queue (batch tested with PRs 60542, 60237). 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>.

Audit use buffered backend

This is the next step after https://github.com/kubernetes/kubernetes/pull/60076

This PR fixes https://github.com/kubernetes/kubernetes/issues/53020, to address https://github.com/kubernetes/kubernetes/issues/53006 later

In this PR buffered backend, introduced in https://github.com/kubernetes/kubernetes/pull/60076, is used to replace ad-hoc solution for webhook and add an ability to enable buffering for the log audit backend.

```release-note
Log audit backend can now be configured to perform batching before writing events to disk.
```

/cc @sttts @tallclair @ericchiang @CaoShuFeng
2018-03-01 11:42:48 -08:00
Mik Vyatskov 881e6d4f6f Add buffering to the log audit backend
Signed-off-by: Mik Vyatskov <vmik@google.com>
2018-03-01 14:30:51 +01:00
Mike Danese 024f57affe implement token authenticator for new id tokens 2018-02-27 17:20:46 -08:00
Mike Danese 1fbf8b8f2a svcacct: move getters to use an external clientset 2018-02-27 17:20:46 -08:00
Kubernetes Submit Queue 9714b64761
Merge pull request #51249 from tengqm/service-ip-cidr
Automatic merge from submit-queue (batch tested with PRs 59882, 59434, 57722, 60320, 51249). 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>.

Expose default service IP CIDR in apiserver

**What this PR does / why we need it**:
The `--service-cluster-ip-range` parameter of API server is very important for deploying Kubernetes on some clouds. The default CIDR "10.0.0.0/24" should be exposed at least from the API server's help message so that users have a better idea whether they need to change it.
This patch exposes this default value in API server's help message.

**Which issue this PR fixes** : fixes #51248

**Release note**:
```
NONE
```
2018-02-24 18:43:39 -08:00
Kubernetes Submit Queue 3c2a0c84c5
Merge pull request #60054 from MikeSpreitzer/issue-60042-field
Automatic merge from submit-queue (batch tested with PRs 60054, 60202, 60219, 58090, 60275). 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>.

Fixes for HTTP/2 max streams per connection setting

**What this PR does / why we need it**:
This PR makes two changes.  One is to introduce a parameter
for the HTTP/2 setting that an api-server sends to its clients
telling them how many streams they may have concurrently open in
an HTTP/2 connection.  If left at its default value of zero,
this means to use the default in golang's HTTP/2 code (which
is currently 250; see https://github.com/golang/net/blob/master/http2/server.go).

The other change is to make the recommended options for an aggregated
api-server set this limit to 1000.  The limit of 250 is annoyingly low
for the use case of many controllers watching objects of Kinds served
by an aggregated api-server reached through the main api-server (in
its mode as a proxy for the aggregated api-server, in which it uses a
single HTTP/2 connection for all calls proxied to that aggregated
api-server).

**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 #60042

**Special notes for your reviewer**:

**Release note**:

```release-note
Introduced `--http2-max-streams-per-connection` command line flag on api-servers and set default to 1000 for aggregated API servers.
```
2018-02-23 23:15:33 -08:00
Marek Grabowski f6e9ebffa2 Add a metric exposing number of objects per type 2018-02-23 12:33:09 +00:00
Mike Spreitzer 201c11f147 Fixes for HTTP/2 max streams per connection setting
This PR makes two changes.  One is to introduce a parameter
for the HTTP/2 setting that an api-server sends to its clients
telling them how many streams they may have concurrently open in
an HTTP/2 connection.  If left at its default value of zero,
this means to use the default in golang's HTTP/2 code (which
is currently 250).

The other change is to make the recommended options for an aggregated
api-server set this limit to 1000.  The limit of 250 is annoyingly low
for the use case of many controllers watching objects of Kinds served
by an aggregated api-server reached through the main api-server (in
its mode as a proxy for the aggregated api-server, in which it uses a
single HTTP/2 connection for all calls proxied to that aggregated
api-server).

Fixes #60042
2018-02-22 16:31:21 -05:00
Mike Danese 8ad1c6655b add support for /token subresource in serviceaccount registry 2018-02-21 13:16:51 -08:00
Kubernetes Submit Queue cdbc4fbe20
Merge pull request #58544 from ericchiang/oidc-v2
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>.

oidc authentication: switch to v2 of coreos/go-oidc

Switch to v2 of [coreos/go-oidc](https://github.com/coreos/go-oidc), which uses square/go-jose to verify tokens and supports more signing algorithms.

Most of this PR removes dependencies used by the older version of github.com/coreos/go-oidc, and updates vendor files.

This PR has been tested against tokens issued by Okta, Google, and CoreOS's dex.

Closes https://github.com/kubernetes/kubernetes/issues/57806

```release-note
kube-apiserver: the OpenID Connect authenticator can now verify ID Tokens signed with JOSE algorithms other than RS256 through the --oidc-signing-algs flag.
kube-apiserver: the OpenID Connect authenticator no longer accepts tokens from the Google v3 token APIs, users must switch to the "https://www.googleapis.com/oauth2/v4/token" endpoint.
```

cc @rithujohn191 @liggitt 
cc @kubernetes/sig-auth-pr-reviews
2018-02-21 09:07:23 -08:00
Kubernetes Submit Queue f8298702ff
Merge pull request #54933 from php-coder/psp_introduce_new_api_group
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>.

Introduce PodSecurityPolicy in the policy/v1beta1 API group

Types/constants are completely the same as in `extensions/v1beta1` except that they are located outside of the `extensions` API group.

**What this PR does / why we need it**:
This is the first step for migrating PSP-related stuff away of `extensions` group. See #43214 for more information.

Also it related to https://github.com/kubernetes/features/issues/5

**Example**:
```console
$ cat restricted2.yaml 
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: restricted2
...
$ kubectl create -f restricted.yaml 
podsecuritypolicy "restricted2" created
$ kubectl get psp restricted2 -o yaml
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
...
```

**Release note**:
```release-note
The `PodSecurityPolicy` API has been moved to the `policy/v1beta1` API group. The `PodSecurityPolicy` API in the `extensions/v1beta1` API group is deprecated and will be removed in a future release.
```
2018-02-20 15:44:50 -08:00
Kubernetes Submit Queue 96ec318718
Merge pull request #59842 from ixdy/update-rules_go-02-2018
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 bazelbuild/rules_go, kubernetes/repo-infra, and gazelle dependencies

**What this PR does / why we need it**: updates our bazelbuild/rules_go dependency in order to bump everything to go1.9.4. I'm separating this effort into two separate PRs, since updating rules_go requires a large cleanup, removing an attribute from most build rules.

**Release note**:

```release-note
NONE
```
2018-02-19 22:23:05 -08:00
Slava Semushin 29514f2883 Update generated files. 2018-02-19 20:14:28 +01:00
Slava Semushin 379683d9f4 Introduce PodSecurityPolicy in the policy/v1beta1 API group.
PSP are completely the same as in extensions/v1beta1 except that they
are located outside of the extensions API group.
2018-02-19 20:14:28 +01:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Eric Chiang 48c6d1abf5
oidc authentication: switch to v2 of coreos/go-oidc 2018-02-16 10:57:48 -08:00
Davanum Srinivas 265e5ae085 Log the command line flags
With d7ddcca231, we lost the logging
of the flags. We should at least log what the command line flags
were used to start processes as those incredibly useful for trouble shooting.
2018-02-15 18:04:04 -05:00
Kubernetes Submit Queue 2a8049890a
Merge pull request #59492 from dims/remove-old-keystone-authenticator
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 experimental keystone authenticator

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

experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559

So we don't need this older style / hard coded / experimental code
anymore.

**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
kube-apiserver: the experimental in-tree Keystone password authenticator has been removed in favor of extensions that enable use of Keystone tokens.
```
2018-02-13 14:14:45 -08:00
Kubernetes Submit Queue bd6b71d015
Merge pull request #59582 from sttts/sttts-ctrl-mgr-auth
Automatic merge from submit-queue (batch tested with PRs 59653, 58812, 59582, 59665, 59511). 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>.

controller-manager: switch to options+config pattern and add https+auth

This PR switch the {kube,cloud}-controller-managers to use the Options+Config struct pattern for bootstrapping, as we use it throughout all apiservers. This allows us to easily plug in https and authn/z support.

Fixes parts of https://github.com/kubernetes/kubernetes/issues/59483

This is equivalent to https://github.com/kubernetes/kubernetes/pull/59408 after squashing.

```release-note
Deprecate insecure HTTP port of kube-controller-manager and cloud-controller-manager. Use `--secure-port` and `--bind-address` instead.
```
2018-02-13 11:12:47 -08:00
Dr. Stefan Schimanski 4e0114b0dd apiserver: make SecureServingOptions and authz/n options re-usable 2018-02-13 11:16:38 +01:00
Jordan Liggitt f8e206e802
Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Kubernetes Submit Queue 24f387127a
Merge pull request #58854 from liggitt/prefer-v1-storage
Automatic merge from submit-queue (batch tested with PRs 59580, 58854). 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>.

Prefer apps/v1 storage for daemonsets, deployments, replicasets, statefulsets

The workload API objects went GA in 1.9. This means we can safely begin persisting them in etcd in apps/v1 format in 1.10.

xref #43214

```release-note
DaemonSet, Deployment, ReplicaSet, and StatefulSet objects are now persisted in etcd in apps/v1 format
```
2018-02-08 16:58:32 -08:00
alex cfdea234c3 Adding benchmarks to envelop encryption integration tests 2018-02-08 10:57:58 -08:00
Davanum Srinivas 18590378c4 Remove experimental keystone authenticator
experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559

So we don't need this older style / hard coded / experimental code
anymore.
2018-02-07 19:28:55 -05:00
Kubernetes Submit Queue 8363129ee6
Merge pull request #58462 from NickrenREN/va-to-beta
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 V1beta1 VolumeAttachment API

**What this PR does / why we need it**:
Add V1beta1 VolumeAttachment API, co-existing with Alpha API 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 #58461

**Special notes for your reviewer**:

**Release note**:
```release-note
Add V1beta1 VolumeAttachment API, co-existing with Alpha API object
```
2018-02-01 18:50:25 -08:00
Kubernetes Submit Queue a7a3dcfc52
Merge pull request #59037 from hzxuzhonghu/aggregator-api
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 aggregator api group install

**What this PR does / why we need it**:
refactor aggregator apigroup install. move NewRESTStorage to 
`staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/rest/storage_apiservice.go`

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-01 04:35:10 -08:00