Commit Graph

5952 Commits (06c5afe275869de3f4630592b54cc16066081084)

Author SHA1 Message Date
Kubernetes Submit Queue 26ac26579d
Merge pull request #57672 from stewart-yu/enhanceKubeProxy
Automatic merge from submit-queue (batch tested with PRs 57672, 60299, 59757, 60283, 60265). 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-proxy]enhance kubeproxy init flag

**What this PR does / why we need it**:
 remove `TODO: once we switch everything over to Cobra commands, we can go back to calling
	utilflag.InitFlags() (by removing its pflag.Parse() call). For now, we have to set the
	 normalize func and add the go flag set by hand.`

**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-02-23 21:21:38 -08:00
Kubernetes Submit Queue e833d6880e
Merge pull request #59883 from kow3ns/ds-cntrl-v1
Automatic merge from submit-queue (batch tested with PRs 59286, 59743, 59883, 60190, 60165). 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>.

DaemonSet Controller and tests to apps/v1

**What this PR does / why we need it**:
Updates the DaemonSet controller, its integration tests, and its e2e tests to use the apps/v1 API.

**Release note**:
```release-note
The DaemonSet controller, its integration tests, and its e2e tests, have been updated to use the apps/v1 API.
```
2018-02-23 20:09:35 -08:00
Lion-Wei a0acc28b62 Add validation of apiserver-advertise-address 2018-02-24 10:23:27 +08:00
Mike Danese f9a4496954 kubectl: delete dead package 2018-02-23 18:04:37 -08:00
test a3fb9b4443
kubeadm: use localhost for API server liveness probe 2018-02-23 18:02:36 -08:00
leigh schrandt f61430d7c8 Fix typos
- Fix typos in tests for upgrade phase
- Rename loadCertificateAuthorithy() --> loadCertificateAuthority()
- Disambiguate apiKubeletClientCert & apiEtcdClientCert
- Parameterize hard-coded certs_test config + log tempCertsDir
2018-02-23 17:05:43 -07:00
leigh schrandt f5e11a0ce0 Change SANs for etcd serving and peer certs
- Place etcd server and peer certs & keys into pki subdir
- Move certs.altName functions to pkiutil + add appendSANstoAltNames()
    Share the append logic for the getAltName functions as suggested by
    @jamiehannaford.
    Move functions/tests to certs/pkiutil as suggested by @luxas.

    Update Bazel BUILD deps

- Warn when an APIServerCertSANs or EtcdCertSANs entry is unusable
- Add MasterConfiguration.EtcdPeerCertSANs
- Move EtcdServerCertSANs and EtcdPeerCertSANs under MasterConfiguration.Etcd
2018-02-23 17:05:39 -07:00
Kubernetes Submit Queue 6a7656b693
Merge pull request #59814 from sttts/sttts-ctrl-mgr-owners
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>.

cmd/controller-manager: add OWNERS for generic controller-manager code

This should have the same owners as kube-controller-manager.
2018-02-23 15:43:26 -08:00
leigh schrandt bb689eb2bb Secure etcd API /w TLS on kubeadm init [kubeadm/#594]
- Generate Server and Peer cert for etcd
- Generate Client cert for apiserver
- Add flags / hostMounts for etcd static pod
- Add flags / hostMounts for apiserver static pod

- Generate certs on upgrade of static-pods for etcd/kube-apiserver
- Modify logic for appending etcd flags to staticpod to be safer for external etcd
2018-02-23 16:06:55 -07:00
Kubernetes Submit Queue bacadb3263
Merge pull request #57921 from verult/FlexE2EGA
Automatic merge from submit-queue (batch tested with PRs 60302, 57921, 59042, 60126, 59561). 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>.

Removing Flexvolume feature tag in e2e tests because Flexvolume is now GA

**What this PR does / why we need it**: Flexvolume e2e tests should be run in serial test suite after the feature was marked GA.

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

/release-note-none
/sig storage
/cc @wongma7
2018-02-23 14:01:41 -08:00
Michael Taufen b4bddcc998 expunge the word 'manifest' from Kubelet's config API
The word 'manifest' technically refers to a container-group specification
that predated the Pod abstraction. We should avoid using this legacy
terminology where possible. Fortunately, the Kubelet's config API will
be beta in 1.10 for the first time, so we still had the chance to make
this change.

I left the flags alone, since they're deprecated anyway.

I changed a few var names in files I touched too, but this PR is the
just the first shot, not the whole campaign
(`git grep -i manifest | wc -l -> 1248`).
2018-02-23 11:44:06 -08:00
Marek Grabowski f6e9ebffa2 Add a metric exposing number of objects per type 2018-02-23 12:33:09 +00:00
stewart-yu 25e110dffc [kube-proxy]enhance kubeproxy init flag 2018-02-23 17:14:19 +08:00
Kubernetes Submit Queue 0d777b16e0
Merge pull request #59719 from hzxuzhonghu/pprof-profiling
Automatic merge from submit-queue (batch tested with PRs 59463, 59719, 60181, 58283, 59966). 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>.

components pprof profiling make use of existing genericapiserver's

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

fix #60278

Instead of writing private pprof, all components make use of generic apiserver existing profiling.

**Release note**:

```release-note
NONE
```
2018-02-23 00:34:22 -08:00
Kubernetes Submit Queue b38f1b901f
Merge pull request #59898 from Random-Liu/add-log-rotation
Automatic merge from submit-queue (batch tested with PRs 60214, 58762, 59898, 59897, 60204). 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 CRI container log rotation support

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

This PR:
1) Added `pkg/kubelet/logs/container_log_manager.go` which manages and rotates container logs.
2) Added a feature gate `CRIContainerLogRotation` to enable the alpha feature. And 2 kubelet flags `--container-log-max-size` and `--container-log-max-files` to configure the rotation behavior.
3) Added unit test and node e2e test for container log rotation.

Note that:
1) Container log manager only starts when the container runtime is `remote` (not docker), because we can't implement `ReopenContainerLog` for docker.
2) Rotated logs are compressed with `gzip`.
2) The latest rotated log is not compressed. Because fluentd may still be reading the file right after rotation.
3) `kubectl logs` still doesn't support log rotation. This is not a regression anyway, it doesn't support log rotation for docker log today. We'll probably fix this in the future. (Issue: https://github.com/kubernetes/kubernetes/issues/59902)

An example of container log directory with `--container-log-max-files=3`:
```console
$ ls -al /var/log/pods/57146449-11ec-11e8-90e1-42010af00002
total 592
drwxr-xr-x 2 root root   4096 Feb 15 01:07 .
drwxr-xr-x 3 root root  12288 Feb 15 01:06 ..
-rw-r----- 1 root root 176870 Feb 15 01:07 log-container_0.log
-rw-r--r-- 1 root root  40239 Feb 15 01:07 log-container_0.log.20180215-010737.gz
-rw-r----- 1 root root 365996 Feb 15 01:07 log-container_0.log.20180215-010747
```

/assign @mtaufen for the config change.
/assign @dashpole @crassirostris for the log change.
/assign @feiskyer for CRI related change.
/cc @yujuhong @feiskyer @abhi @mikebrow @mrunalp @runcom 
/cc @kubernetes/sig-node-pr-reviews @kubernetes/sig-instrumentation-pr-reviews 

**Release note**:

```release-note
[Alpha] Kubelet now supports container log rotation for container runtime which implements CRI(container runtime interface).
The feature can be enabled with feature gate `CRIContainerLogRotation`.
The flags `--container-log-max-size` and `--container-log-max-files` can be used to configure the rotation behavior.
```
2018-02-22 22:02:37 -08:00
Kubernetes Submit Queue da564ef4fb
Merge pull request #57962 from xiangpengzhao/proxy-feature-gates
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>.

 Migrate FeatureGates type of kube-proxy from string to map[string]bool

**What this PR does / why we need it**:
Migration of FeatureGates type. This is a follow-up of #53025.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: #53025
https://github.com/kubernetes/kubernetes/pull/57754#discussion_r160023416

**Special notes for your reviewer**:
/cc @luxas @mtaufen @ncdc 

**Release note**:

```release-note
action required: kube-proxy: feature gates are now specified as a map when provided via a JSON or YAML KubeProxyConfiguration, rather than as a string of key-value pairs.
```
2018-02-22 19:32:41 -08:00
Lantao Liu d7b21a3358 Use container log manager in kubelet 2018-02-23 01:42:35 +00:00
Kubernetes Submit Queue 6e856480c0
Merge pull request #55168 from nikhita/customresources-subresources
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>.

apiextensions: add subresources for custom resources

Fixes #38113
Fixes #58778

**Related**:
- Proposal: https://github.com/kubernetes/community/pull/913
- For custom resources to work with `kubectl scale`: https://github.com/kubernetes/kubernetes/pull/58283

**Add types**:

- Add `CustomResourceSubResources` type to CRD.
    - Fix proto generation for `CustomResourceSubResourceStatus`: https://github.com/kubernetes/kubernetes/pull/55970.
- Add feature gate for `CustomResourceSubResources`.
    - Update CRD strategy: if feature gate is disabled, this feature is dropped (i.e. set to `nil`).
- Add validation for `CustomResourceSubResources`:
    - `SpecReplicasPath` should not be empty and should be a valid json path under `.spec`. If there is no value under the given path in the CustomResource, the `/scale` subresource will return an error on GET.
    - `StatusReplicasPath` should not be empty and should be a valid json path under `.status`. If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource will default to 0.
    - If present, `LabelSelectorPath` should be a valid json path. If there is no value under `LabelSelectorPath` in the CustomResource, the status label selector value in the `/scale` subresource will default to the empty string.
    - `ScaleGroupVersion` should be `autoscaling/v1`.
    - If `CustomResourceSubResources` is enabled, only `properties` is allowed under the root schema for CRD validation.

**Add status and scale subresources**:

- Use helper functions from `apimachinery/pkg/apis/meta/v1/unstructured/helpers.go`.
    - Improve error handling: https://github.com/kubernetes/kubernetes/pull/56563, https://github.com/kubernetes/kubernetes/pull/58215.
- Introduce Registry interface for storage.
- Update storage:
    - Introduce `CustomResourceStorage` which acts as storage for the custom resource and its status and scale subresources. Note: storage for status and scale is only enabled when the feature gate is enabled _and_ the respective fields are enabled in the CRD.
    - Introduce `StatusREST` and its `New()`, `Get()` and `Update()` methods.
    - Introduce `ScaleREST` and its `New()`, `Get()` and `Update()` methods.
        - Get and Update use the json paths from the CRD and use it to return an `autoscaling/v1.Scale` object.
- Update strategy:
    - In `PrepareForCreate`,
         - Clear `.status`.
         - Set `.metadata.generation` = 1
    - In `PrepareForUpdate`,
         - Do not update `.status`.
             - If both the old and new objects have `.status` and it is changed, set it back to its old value.
             - If the old object has a `.status` but the new object doesn't, set it to the old value.
             - If old object did not have a `.status` but the new object does, delete it.
         - Increment generation if spec changes i.e. in the following cases:
             - If both the old and new objects had `.spec` and it changed.
             - If the old object did not have `.spec` but the new object does.
             - If the old object had a `.spec` but the new object doesn't.
     - In `Validate` and `ValidateUpdate`,
        - ensure that values at `specReplicasPath` and `statusReplicasPath` are >=0 and < maxInt32.
        - make sure there are no errors in getting the value at all the paths.
    - Introduce `statusStrategy` with its methods.
        - In `PrepareForUpdate`:
            - Do not update `.spec`.
                - If both the old and new objects have `.spec` and it is changed, set it back to its old value.
                - If the old object has a `.spec` but the new object doesn't, set it to the old value.
                - If old object did not have a `.spec` but the new object does, delete it.
             - Do not update `.metadata`.
        - In `ValidateStatusUpdate`:
            - For CRD validation, validate only under `.status`.
            - Validate value at `statusReplicasPath` as above. If `labelSelectorPath` is a path under `.status`, then validate it as well.
- Plug into the custom resource handler:
    - Store all three storage - customResource, status and scale in `crdInfo`.
    - Use the storage as per the subresource in the request.
    - Use the validator as per the subresource (for status, only use the schema for `status`, if present).
    - Serve the endpoint as per the subresource - see `serveResource`, `serveStatus` and `serveScale`.
- Update discovery by adding the `/status` and `/scale` resources, if enabled.

**Add tests**:

- Add unit tests in `etcd_test.go`.
- Add integration tests.
    - In `subresources_test.go`, use the [polymporphic scale client](https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/client-go/scale) to get and update `Scale`.
    -  Add a test to check everything works fine with yaml in `yaml_test.go`.

**Release note**:

```release-note
`/status` and `/scale` subresources are added for custom resources.
```
2018-02-22 13:37:35 -08: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
Kenneth Owens f52e7ef4bf Update the DaemonSet controller to use the apps/v1 API 2018-02-22 11:38:54 -08:00
Nikhita Raghunath 6fbe8157e3 add subresources for custom resources 2018-02-22 23:26:09 +05:30
Sandeep Rajan f038d994e0 bump coredns feature gates to beta 2018-02-22 11:03:58 -05:00
Sandeep Rajan 993e5413ce update version and manifest 2018-02-22 10:40:24 -05:00
hzxuzhonghu 398a0a9e66 update bazel 2018-02-22 16:43:13 +08:00
hzxuzhonghu 33976838d9 kube-proxy make use of generic apiserver profiling 2018-02-22 16:43:12 +08:00
hzxuzhonghu 385a61e04f kube-scheduler make use of generic apiserver profiling 2018-02-22 16:43:12 +08:00
hzxuzhonghu c51fc2986b controller-manager make use of generic apiserver profiling 2018-02-22 16:43:07 +08:00
Kubernetes Submit Queue d7cadf5d18
Merge pull request #59288 from stevesloka/apiServerDNS
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 configuration item to allow kubeadm join to use a dns name pointing to control plane

This adds a new flag (`--apiserver-advertise-dns-address`) to kubeadm which is used in node kubelet.confg to point to API server allowing users to define a DNS entry instead of an IP address.

Fixes kubernetes/kubeadm#411

```release-note
Adds new flag `--apiserver-advertise-dns-address` which is used in node kubelet.confg to point to API server
```
// @timothysc @craigtracey
2018-02-21 23:01:08 -08:00
Kubernetes Submit Queue 8b94ae8ca8
Merge pull request #58111 from mikedanese/id-registry
Automatic merge from submit-queue (batch tested with PRs 60158, 60156, 58111, 57583, 60055). 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 support for /token subresource in serviceaccount registry

I'm planning on implementing the registry bits (this) in one PR and followup with an authenticator that supports new id tokens.

https://github.com/kubernetes/kubernetes/issues/58790

@kubernetes/sig-auth-pr-reviews 

```release-note
NONE
```
2018-02-21 22:10:31 -08:00
Kubernetes Submit Queue 097d3f13d1
Merge pull request #54191 from MrHohn/kube-proxy-metrics-flag-fix
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>.

kube-proxy: Fix flag validation for healthz-bind-address and metrics-bind-address

**What this PR does / why we need it**: `--healthz-bind-address` and `--metrics-bind-address` are broken for kube-proxy as they do not allow `ip:port` format, though they claim to support it.

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

**Special notes for your reviewer**:
cc @ncdc 

**Release note**:

```release-note
Fix kube-proxy flags validation for --healthz-bind-address and --metrics-bind-address to allow specifying ip:port.
```
2018-02-21 18:46:41 -08:00
Kubernetes Submit Queue 5e64f075dc
Merge pull request #60022 from fabriziopandini/kubeadm567
Automatic merge from submit-queue (batch tested with PRs 60148, 60022, 59125, 60068, 60154). 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 kubeadm join command generation

**What this PR does / why we need it**:
Creation of the `kubeadm join` command is implemented in three different points of kubeadm:
- `kubeadm init`
- `kubeadm token create`
- `kubeadm phase bootstrap-token create`

This PR refactor above points in order to share a common function for creating the `kubeadm join` command.

**Which issue(s) this PR fixes**:
Fixes [#567](https://github.com/kubernetes/kubeadm/issues/567)

**Special notes for your reviewer**:
While implementing the PR, I changed the order of parameters in `kubeadm join` from:

```
  kubeadm join --token 8df4zm.5jyv2nrxb18y84jq 172.31.0.101:6443 --discovery-token-ca-cert-hash sha256:b62e1f70c1c6afebe36bc971b15b90f7e453f1c0fe2ddc4d92e07512f1143194
```

to

```
  kubeadm join 172.31.0.101:6443 --token 8df4zm.5jyv2nrxb18y84jq --discovery-token-ca-cert-hash sha256:b62e1f70c1c6afebe36bc971b15b90f7e453f1c0fe2ddc4d92e07512f1143194
```

**Release note**:
```release-note
NONE
```
2018-02-21 18:09:40 -08:00
Kubernetes Submit Queue ca26eabeb4
Merge pull request #60148 from mtaufen/deprecate-kubeletconfig-flags
Automatic merge from submit-queue (batch tested with PRs 60148, 60022, 59125, 60068, 60154). 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 KubeletConfiguration flags

This is a follow-up to #53833 to deprecate the old flags in favor of the
config file.

```release-note
Flags that can be set via the Kubelet's --config file are now deprecated in favor of the file.
```
2018-02-21 18:09:37 -08:00
Kubernetes Submit Queue 2bbaf430d8
Merge pull request #59316 from smarterclayton/terminate_early
Automatic merge from submit-queue (batch tested with PRs 58716, 59977, 59316, 59884, 60117). 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>.

Cap how long the kubelet waits when it has no client cert

If we go a certain amount of time without being able to create a client
cert and we have no current client cert from the store, exit. This
prevents a corrupted local copy of the cert from leaving the Kubelet in a
zombie state forever. Exiting allows a config loop outside the Kubelet
to clean up the file or the bootstrap client cert to get another client
cert.

Five minutes is a totally arbitary timeout, judged to give enough time for really slow static pods to boot.

@mikedanese

```release-note
Set an upper bound (5 minutes) on how long the Kubelet will wait before exiting when the client cert from disk is missing or invalid. This prevents the Kubelet from waiting forever without attempting to bootstrap a new client credentials.
```
2018-02-21 15:40:41 -08:00
Mike Danese 8ad1c6655b add support for /token subresource in serviceaccount registry 2018-02-21 13:16:51 -08:00
Michael Taufen 722dccf38c Deprecate KubeletConfiguration flags
This is a follow-up to #53833 to deprecate the old flags in favor of the
config file.
2018-02-21 09:48:44 -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 4bfc29916b
Merge pull request #59901 from NickrenREN/rename-storageobjinuseprotection
Automatic merge from submit-queue (batch tested with PRs 59901, 59302, 59928). 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>.

Rename StorageProtection to StorageObjectInUseProtection

Rename StorageProtection to StorageObjectInUseProtection

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

**Special notes for your reviewer**:

**Release note**:
```release-note
Rename StorageProtection to StorageObjectInUseProtection
```
2018-02-21 07:02:32 -08:00
Kubernetes Submit Queue 72e0256935
Merge pull request #59057 from JordanFaust/add-cri-socket-to-kubeadm-master-manifest
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 criSocket to kubeadm MasterConfiguration manifest

**What this PR does / why we need it**:
Adds a criSocket field to the MasterConfiguration manifest used by kubeadm. This field configures the cri socket that kubeadm uses during preflight checks.  

**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 # kubernetes/kubeadm#679

**Special notes for your reviewer**:

kubeadm does not allow the use of --config and the --cri-socket flag together. When using kubeadm to create a cluster that will not be using docker, the preflight checks fail since this is not configurable. This PR adds the criSocket to the MasterConfiguration manifest and uses that value within the MasterConfiguration if it was provided. 

Storing the value of the criSocket within the MasterConfiguration manifest will also make joining additional masters with the proposed 'kubeadm join --master' command by not requiring operators to remember to include an additional flag. This may not be the case if we instead relaxed the constraint of using additional flags when using the --config flag is set.

**Release note**:
/area kubeadm
/assign @luxas
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews

```release-note
kubeadm: add criSocket field to MasterConfiguration manifiest
```
2018-02-21 04:22:31 -08:00
Kubernetes Submit Queue a90e43ca32
Merge pull request #59292 from JordanFaust/add-cri-socket-to-node-configuration
Automatic merge from submit-queue (batch tested with PRs 59292, 59600). 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 criSocket to kubeadm NodeConfiguration manifest

**What this PR does / why we need it**:
Adds a criSocket field to the NodeConfiguration manifest used by kubeadm. This field configures the cri socket that kubeadm uses during preflight checks.  

**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 # kubernetes/kubeadm#679

**Special notes for your reviewer**:

This is a follow up PR, as requested, to https://github.com/kubernetes/kubernetes/pull/59057. The NodeConfiguration manifest now has a criSocket field that can be used when using the config manifest to join a node to the cluster.

**Release note**:
/area kubeadm
/assign @luxas
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews

```release-note
kubeadm: add criSocket field to NodeConfiguration manifiest
```
2018-02-21 03:25:30 -08:00
NickrenREN dad0fa07b7 rename StorageProtection to StorageObjectInUseProtection 2018-02-21 10:48:56 +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 b3099bcf53
Merge pull request #58097 from steveperry-53/ipv6
Automatic merge from submit-queue (batch tested with PRs 59391, 58097, 60057, 60090). 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 IPv6 to command options.

**What this PR does / why we need it**:
This PR adds IPv6 information to the descriptions for several command options.

[Related PR in kubernetes/website](https://github.com/kubernetes/website/pull/6498)

**Release note**:

```release-note
NONE
```
2018-02-20 13:51:32 -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
jiaxuanzhou 039b695e29 Disable image GC when high threshold is set to 100 2018-02-20 14:07:19 +08:00
jiaxuanzhou 17fff2d4ba Disable ImageGC when high threshold is set to 0 2018-02-20 13:49:12 +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
fabriziopandini 33f8ca9cd7 autogenerated files 2018-02-18 16:23:09 +01:00
fabriziopandini c09d875c6c refactor kubeadm join command generation 2018-02-18 16:22:42 +01:00
Kubernetes Submit Queue 6efdc940e8
Merge pull request #59683 from oomichi/cleanup
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 unused getClusterCIDR()

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

getClusterCIDR() has been unused since the PR 57305[1], so this
removes the method for code cleanup.

[1]: https://github.com/kubernetes/kubernetes/pull/57305

**Release note**: "NONE"
2018-02-16 15:41:26 -08:00
Kubernetes Submit Queue cfa6d35c85
Merge pull request #59827 from dashpole/depreciate_cadvisor_port
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 kubelet flag for cadvisor port

**Which issue(s) this PR fixes**:
Issue: #56523
TL;DR the Kubelet's `stats/summary` API is the preferred way of monitoring the node.  If you need additional metrics from cAdvisor,  it can be run as a daemonset.

**Release note**:
```release-note
Deprecate the kubelet's cadvisor port
```

/assign @mtaufen @tallclair 
cc @kubernetes/sig-node-pr-reviews
2018-02-16 15:02:06 -08:00
Kubernetes Submit Queue df92baf6e4
Merge pull request #59874 from dims/log-command-line-flags
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>.

Log the command line flags

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

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.


**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**:
/assign @deads2k 
/assign @liggitt 

**Release note**:

```release-note
NONE
```
2018-02-16 14:22:25 -08: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
Kubernetes Submit Queue 72e1cf21c4
Merge pull request #59933 from mikedanese/rm-cert-controller
Automatic merge from submit-queue (batch tested with PRs 59873, 59933, 59923, 59944, 59953). 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>.

gke-certificates-controller: rm -rf

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

```release-note
NONE
```
2018-02-15 20:16:36 -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
Mike Danese b973840481 gke-certificates-controller: rm -rf 2018-02-15 12:01:00 -08:00
Steve Sloka dc03cc0035 Update build deps for Bazel and zz_generated 2018-02-15 12:05:29 -05:00
Steve Sloka 2fd29a0406 Add configuration item to allow kubeadm join to use a dns name pointing to control plane 2018-02-15 12:03:32 -05:00
Michael Taufen 9ebaf5e7d2 Move the kubeletconfig v1alpha1 API to beta, rename to kubelet.config.k8s.io 2018-02-14 17:30:22 -08:00
steveperry-53 cc7cea74ae Merge branch 'master' into ipv6 2018-02-14 10:45:27 -08:00
Kris Nova c66841d215 kubeadm: Demote controlplane passthrough flags to phases alpha
After a discussion in sig cluster lifecycle we agreed that the passthrough flags should live in phases alpha, and not be 1st class flags.
Relates to kubernetes/kubernetes/pull/58080
Closes kubernetes/kubeadm/issues/676
2018-02-14 10:25:29 -08:00
Kubernetes Submit Queue 63380d12db
Merge pull request #59666 from mtaufen/kc-secure-componentconfig-defaults
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>.

Secure Kubelet's componentconfig defaults while maintaining CLI compatibility

This updates the Kubelet's componentconfig defaults, while applying the legacy defaults to values from options.NewKubeletConfiguration(). This keeps defaults the same for the command line and improves the security of defaults when you load config from a file.

See: https://github.com/kubernetes/kubernetes/issues/53618
See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166669931

Also moves EnableServer to KubeletFlags, per @tallclair's comments on #53833.

We should find way of generating documentation for config file defaults, so that people can easily look up what's different from flags.

```release-note
Action required: Default values differ between the Kubelet's componentconfig (config file) API and the Kubelet's command line. Be sure to review the default values when migrating to using a config file.
```
2018-02-14 10:09:13 -08:00
Kubernetes Submit Queue a1d559915f
Merge pull request #59711 from hzxuzhonghu/kubemark-cobra
Automatic merge from submit-queue (batch tested with PRs 59800, 59817, 59711). 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>.

Kubemark using cobra commands 

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

**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-02-14 08:40:43 -08:00
Dr. Stefan Schimanski 5ee35dbcff cmd/controller-manager: add OWNERS for generic controller-manager code 2018-02-14 09:48:08 +01:00
Michael Taufen c1e34bc725 Secure Kubelet's componentconfig defaults while maintaining CLI compatibility
This updates the Kubelet's componentconfig defaults, while applying the
legacy defaults to values from options.NewKubeletConfiguration().
This keeps defaults the same for the command line and improves the
security of defaults when you load config from a file.

See: https://github.com/kubernetes/kubernetes/issues/53618
See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166669931
2018-02-13 18:10:15 -08:00
hzxuzhonghu f40e5b2d2c kubemark using cobra commands 2018-02-14 09:05:17 +08:00
David Ashpole 6152767b53 deprecate kubelet's cadvisor port 2018-02-13 16:25:19 -08:00
Kubernetes Submit Queue 859d8761be
Merge pull request #59691 from NickrenREN/csi-feature-gate
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 CSI plugin from ProbeExpandableVolumePlugins

Add CSI plugin when feature gate is enabled

**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
```

/sig storage

/assign @vladimirvivien
2018-02-13 15:03:12 -08: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
Sandeep Rajan 8107f15571 use caddy for translation 2018-02-13 16:21:23 -05:00
Sandeep Rajan 73378fe6eb improve tests 2018-02-13 16:21:23 -05:00
Sandeep Rajan d2e83a2b07 add federations translation 2018-02-13 16:21:23 -05:00
Sandeep Rajan 6d8459166d kube-dns configmap translate 2018-02-13 16:21:23 -05:00
Jordan Faust 2c956cf19e Add criSocket to kubeadm MasterConfiguration manifest 2018-02-13 14:18:24 -06: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
Kubernetes Submit Queue f7e5757380
Merge pull request #58812 from bart0sh/PR0001-join-checks
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>.

Add   HTTPProxyCheck to preflight checks for 'kubeadm join' subcommand

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

Add HTTPProxyCheck for API servers
    
It makes sense to check API servers and print warnings if they're
going to be accessed through proxy. This is similar to what's
already done for 'kubeadm init'.
2018-02-13 11:12:44 -08:00
Kubernetes Submit Queue 1e8f40f42b
Merge pull request #59653 from bart0sh/PR0006-remove-bootstrap-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>.

Remove bootstrap kubelet config on reset

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

Remove /etc/kubernetes/bootstrap-kubelet.conf when running 'kubeadm reset'
to ensure it will not be reused when joining the cluster next time.

**Release note**:
```release-note
NONE
```
2018-02-13 10:34:27 -08:00
Jordan Faust 62dddb7853 Add criSocket to kubeadm NodeConfiguration manifest 2018-02-13 09:16:23 -06:00
Kubernetes Submit Queue fd553ca8e2
Merge pull request #53766 from liggitt/ui-redirect
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 /ui/ redirect

The existing kube-apiserver hard-codes `/ui` to redirect to an optional add-on, which is not appropriate. It does not work in the following scenarios:
* https-enabled dashboards
* the dashboard is deployed to a different namespace or service name
* the dashboard is not installed at all
* authorization is enabled and does not allow access to /ui

This PR removes the hard-coded `/ui` redirect.

```release-note
apiserver: the /ui kube-dashboard redirect has been removed. Follow instructions specific to your deployment to access kube-dashboard
```
2018-02-13 04:29:18 -08:00
Dr. Stefan Schimanski 5483ab7679 Update generated files 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski cecd663c21 controller-manager: add authz/n to options, nil by default 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski f4564ea0b8 controller-manager: add SecureServingOptions 2018-02-13 11:16:47 +01:00
Dr. Stefan Schimanski 4e0114b0dd apiserver: make SecureServingOptions and authz/n options re-usable 2018-02-13 11:16:38 +01:00
stewart-yu 0cbe0a6034 controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
Kubernetes Submit Queue fd55cb25f1
Merge pull request #55479 from ijc/kubeadm-optional-master-taint
Automatic merge from submit-queue (batch tested with PRs 59767, 56454, 59237, 59730, 55479). 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>.

kubeadm: add configuration option to not taint master

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

Although tainting the master is normally a good and proper thing to do in some situations (docker for mac in our case, but I suppose minikube and such as well) having a single host configuration is desirable.

In linuxkit we have a [workaround](443e47c408/projects/kubernetes/kubernetes/kubeadm-init.sh (L19...L22)) to remove the taint after initialisation. With the change here we could simply populate `/etc/kubeadm/kubeadm.yaml` with `noTaintMaster: true` instead and have it never be tainted in the first place.

I have only added this to the config file and not to the CLI since AIUI the latter is somewhat deprecated.

The code also arranges to _remove_ an existing taint if it is unwanted. I'm unsure if this behaviour is correct or desirable, I think a reasonable argument could be made for leaving an existing taint in place too.

Signed-off-by: Ian Campbell <ijc@docker.com>

**Release note**:

Since the requirement for this option is rather niche and not best practice in the majority of cases I'm not sure if it warrants mentioning in the release notes? If it were then perhaps

```release-note
`kubeadm init` can now omit the tainting of the master node if configured to do so in `kubeadm.yaml`.
```
2018-02-12 15:44:41 -08:00
Kubernetes Submit Queue f072871b07
Merge pull request #59359 from khenidak/svc-remove-sync
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 controller-manager --service-sync-period flag

**What this PR does / why we need it**:
This PR removes controller manager --service-sync-period flag which is not used anywhere in the code and is causing confusion
 
**Which issue(s) this PR fixes** 
https://github.com/kubernetes/kubernetes/issues/58776

**Special notes for your reviewer**:
@deads2k this remove the flag as per the discussion on #58776 
2 commits 
1. one for code change
2. one for auto generated code

**Release note**:
```release-note
1. Controller-manager --service-sync-period flag is removed (was never used in the code).
```
2018-02-12 13:50:09 -08:00
Kubernetes Submit Queue fdeaa8c67a
Merge pull request #59067 from chuckha/audit
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>.

Feature Gate - Kubeadm Audit Logging

Fixes kubernetes/kubeadm#623

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>



**What this PR does / why we need it**:
This PR enables [Auditing](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) behind a featureGate. A user can supply their own audit policy with configuration option as well as a place for the audit logs to live. If no policy is supplied a default policy will be provided. The default policy will log all Metadata level policy logs. It is the example provided in the documentation.
**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 kubernetes/kubeadm#623

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Enable auditing behind a feature gate.
```
2018-02-12 09:35:42 -08:00
Ken'ichi Ohmichi 30e4ba74a8 Remove unused getClusterCIDR()
getClusterCIDR() has been unused since the PR 57305[1], so this
removes the method for code cleanup.

[1]: https://github.com/kubernetes/kubernetes/pull/57305
2018-02-12 09:15:42 -08:00
Ian Campbell a4e00ff3d8 kubeadm: add configuration option to not taint master
Although tainting the master is normally a good and proper thing to do in some
situations (docker for mac in our case, but I suppose minikube and such as
well) having a single host configuration is desirable.

In linuxkit we have a [workaround](443e47c408/projects/kubernetes/kubernetes/kubeadm-init.sh (L19...L22))
to remove the taint after initialisation. With the change here we could simply
populate /etc/kubeadm/kubeadm.yaml` with `noTaintMaster: true` instead and have
it never be tainted in the first place.

I have only added this to the config file and not to the CLI since AIUI the
latter is somewhat deprecated.

The code also arranges to _remove_ an existing taint if it is unwanted. I'm
unsure if this behaviour is correct or desirable, I think a reasonable argument
could be made for leaving an existing taint in place too.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-12 17:13:27 +00:00
Jordan Liggitt f8e206e802
Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
Kubernetes Submit Queue 19829a24f1
Merge pull request #58960 from rosti/kubeadm-imagepullpolicy
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>.

kubeadm: imagePullPolicy option in init config

**What this PR does / why we need it**:
This PR adds `imagePullPolicy` option to the `kubeadm init` configuration file.

The new `imagePullPolicy` option is forwarded to the generated kubelet static pods for etcd, kube-apiserver, kube-controller-manager and kube-scheduler. This option allows for precise image pull policy specification for master nodes and thus for more tight control over images. It is useful in CI environments and in environments, where the user has total control over master VM templates (thus, the master VM templates can be preloaded with the required Docker images for the control plane services).

**Special notes for your reviewer**:

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas

**Release note**:

```release-note
kubeadm: New "imagePullPolicy" option in the init configuration file, that gets forwarded to kubelet static pods to control pull policy for etcd and control plane images.
```
2018-02-11 07:40:46 -08:00
xiangpengzhao 37c6510290 Make command-line flag --feature-gates compatible 2018-02-11 15:27:42 +08:00
xiangpengzhao 131ce79c65 Update fuzzer to reflect FeatureGates type change. 2018-02-11 15:15:22 +08:00
xiangpengzhao 58bb1447e9 Auto generated files. 2018-02-11 14:40:13 +08:00
xiangpengzhao 57071d85ee Migrate FeatureGates type of kube-proxy from string to map[string]bool 2018-02-11 14:40:13 +08:00
Kubernetes Submit Queue 317853c90c
Merge pull request #59464 from dixudx/fix_all_typos
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>.

fix all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

**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**:
/sig testing
/area test-infra
/sig release
/cc @ixdy 
/assign @fejta 

**Release note**:

```release-note
None
```
2018-02-10 22:12:45 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
NickrenREN 3f51a954ce nit: remove CSI plugin from ProbeExpandableVolumePlugins 2018-02-10 21:18:23 +08:00
Chuck Ha ed769174bb
Enable Audit Logs Behind a Feature Gate
Audit logs are configurable via the MasterConfiguration file.

All options are ignored unless the FeatureGate is enabled.

Fixes kubernetes/kubeadm#623

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-02-09 16:44:39 -05:00
Robert Pothier 4da39ae75d Update Kubeadm proxy handling for IPv6
This updates HTTPProxyCheck with brackets around
the ipv6 address to handle adding :port
2018-02-09 13:15:47 -05:00
Ed Bartosh 59d131d612 Remove bootstrap kubelet config on reset
Made sure /etc/kubernetes/bootstrap-kubelet.conf is removed
to ensure it will not be reused when joining the cluster next time.
2018-02-09 15:33:43 +02:00
Ed Bartosh 3ecc49daaa Add HTTPProxyCheck for API servers
It makes sense to check all API servers mentioned in the command
line and print warnings if they're going to be accessed through proxy.
This is similar to what's already done for 'kubeadm init'.
2018-02-09 15:24:36 +02:00
Rostislav M. Georgiev a50736f142 kubeadm: Support imagePullPolicy option in the kubeadm init configuration file 2018-02-09 10:07:33 +02:00
Kubernetes Submit Queue 36f902d5d0
Merge pull request #59344 from cheyang/fix_kubeadm_typo
Automatic merge from submit-queue (batch tested with PRs 59344, 59595, 59598). 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 kubeadm typo

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

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

```
2018-02-08 18:06:32 -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
Kubernetes Submit Queue 6f1835d828
Merge pull request #59580 from mtaufen/kc-remove-cadvisor-port
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 CAdvisorPort from KubeletConfiguration struct

See: #56523, cAdvisor is becoming an implementation detail of
Kubernetes, and we should not canonize its knobs on the
KubeletConfiguration.

```release-note
NONE
```
2018-02-08 16:19:29 -08:00
Michael Taufen 5ab9ccd4fb remove CAdvisorPort from KubeletConfiguration
See: #56523, cAdvisor is becoming an implementation detail of
Kubernetes, and we should not canonize its knobs on the
KubeletConfiguration.
2018-02-08 13:51:41 -08:00
Kubernetes Submit Queue 1e1b32bf01
Merge pull request #59568 from dims/move-cloud-provider-instantiation-out-from-controller
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>.

Extract instantiation of cloud provider

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

Add a separate method in a new file for creating cloud providers.
Currently the code is all mixed into the controller manager. We
should actively control what is made available to the cloud provider
so list explicitly the parms needed and move the code out. This will
avoid linkages to sneak in as we will catch it better during reviews.


**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-02-08 13:44:50 -08:00
Kubernetes Submit Queue c15ae2fff7
Merge pull request #59360 from immutableT/envelop_encryption_benchmark
Automatic merge from submit-queue (batch tested with PRs 59190, 59360). 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>.

Adding benchmarks to envelop encryption integration tests

**What this PR does / why we need it**:
Adding benchmarks for envelop encryption integration tests.
Allows to estimate how envelop encryption may impact the performance of KubeAPI 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-08 13:31:31 -08:00
Kubernetes Submit Queue 3aa709423d
Merge pull request #59190 from bart0sh/PR0005-kubeadm-remove-os-exec
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>.

Reimplement 2 tests using fakeexec

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

Used fakeexec API from utils/exec/testing to test
GetKubeletVersion and KubeletVersionCheck APIs without running kubelet.

```release-note
NONE
```
2018-02-08 13:02:38 -08:00
Kubernetes Submit Queue 6cc3641730
Merge pull request #59515 from mtaufen/kc-enforcenodeallocatable-none-option
Automatic merge from submit-queue (batch tested with PRs 59054, 59515, 59577). 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 'none' option to EnforceNodeAllocatable

This lets us use omitempty on `EnforceNodeAllocatable`. We shouldn't treat
`nil` as different from `[]T{}`, because this can play havoc with
serializers (a-la #43203).

See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137

```release-note
'none' can now be specified in KubeletConfiguration.EnforceNodeAllocatable (--enforce-node-allocatable) to explicitly disable enforcement.
```
2018-02-08 12:22:32 -08:00
Kubernetes Submit Queue 4830945af3
Merge pull request #59054 from bart0sh/PR0003-proxy-port
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 port from HTTPProxyCheck

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

HTTPProxyCheck doesn't use port. It uses proxy related variables
(HTTP_PROXY, NO_PROXY, etc) that only operate with protocol
and host.

Removing port from the check should make it more clear for
user that port is not used as it will not be present in
the check output.

**Release note**:
```release-note
NONE
```
2018-02-08 12:01:24 -08:00
alex cfdea234c3 Adding benchmarks to envelop encryption integration tests 2018-02-08 10:57:58 -08:00
Michael Taufen 3553390c97 Add 'none' option to EnforceNodeAllocatable
This lets us use omitempty on EnforceNodeAllocatable. We shouldn't treat
`nil` as different from `[]T{}`, because this can play havoc with
serializers (a-la #43203).

See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137
2018-02-08 10:24:39 -08:00
Davanum Srinivas 3d43b446c4 Extract instantiation of cloud provider
Add a separate method in a new file for creating cloud providers.
Currently the code is all mixed into the controller manager. We
should actively control what is made available to the cloud provider
so list explicitly the parms needed and move the code out. This will
avoid linkages to sneak in as we will catch it better during reviews.
2018-02-08 08:15:41 -05:00
Kubernetes Submit Queue fb340a4695
Merge pull request #57824 from thockin/gcr-vanity
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). 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>.

2nd try at using a vanity GCR name

The 2nd commit here is the changes relative to the reverted PR.  Please focus review attention on that.

This is the 2nd attempt.  The previous try (#57573) was reverted while we
figured out the regional mirrors (oops).
    
New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).
    
When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.
    
We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.

xref https://github.com/kubernetes/release/issues/281

TL;DR:
  *  The new `staging-k8s.gcr.io` is where we push images.  It is literally an alias to `gcr.io/google_containers` (the existing repo) and is hosted in the US.
  * The contents of `staging-k8s.gcr.io` are automatically synced to `{asia,eu,us)-k8s.gcr.io`.
  * The new `k8s.gcr.io` will be a read-only alias to whichever regional repo is closest to you.
  * In the future, images will be promoted from `staging` to regional "prod" more explicitly and auditably.

 ```release-note
Use "k8s.gcr.io" for pulling container images rather than "gcr.io/google_containers".  Images are already synced, so this should not impact anyone materially.
    
Documentation and tools should all convert to the new name. Users should take note of this in case they see this new name in the system.
```
2018-02-08 03:29:32 -08:00
Tim Hockin 3586986416 Switch to k8s.gcr.io vanity domain
This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
2018-02-07 21:14:19 -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 5cecc6ec68
Merge pull request #59350 from jsafrane/recycler-wait
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>.

Do not recycle volumes that are used by pods

**What this PR does / why we need it**:
Recycler should wait until all pods that use a volume are finished.

Consider this scenario:

1. User creates a PVC that's bound to a NFS PV.
2. User creates a pod that uses the PVC
3. User deletes the PVC.

Now the PV gets `Released` (the PVC does not exists) and recycled, however the PV is still mounted to a running pod. PVC protection won't help us, because it puts finalizers on PVC that is under user's control and user can remove it.

This PR checks that there is no pod that uses a PV before it recycles it.

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-07 10:01:32 -08:00
Kubernetes Submit Queue 531369d70e
Merge pull request #57230 from xiangpengzhao/new-etcd-in-kubeadm
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 kubeadm supported etcd version to 3.2.14 in 1.10

**What this PR does / why we need it**:
Kubernetes will upgrade to etcd server 3.2.14 in 1.10 cycle (#58645), update DefaultEtcdVersion in kubeadm to this version.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
relevant PR: #57480 #58645
fixes: https://github.com/kubernetes/kubeadm/issues/621

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews

**Release note**:

```release-note
NONE
```
kubeadm don't need to advertise this in release notes.
2018-02-07 02:35:41 -08:00
Ed Bartosh 3bdfdda99b Reimplement 2 tests using fakeexec
Used fakeexec API from utils/exec/testing to test
GetKubeletVersion and KubeletVersionCheck APIs without
running kubelet.
2018-02-07 11:55:44 +02:00
Kubernetes Submit Queue 13ad4ca473
Merge pull request #59325 from kargakis/kubeadm-api-docs
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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>.

Document kubeadm API

Fixes https://github.com/kubernetes/kubeadm/issues/336

@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-02-06 22:42:42 -08:00
Kubernetes Submit Queue da932c19c8
Merge pull request #58769 from pmichali/node-cidr-fix
Automatic merge from submit-queue (batch tested with PRs 59394, 58769, 59423, 59363, 59245). 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>.

IPv6: Ensure calculated node CIDR size for pod subnets is valid

With IPv4, the node CIDR prefix is set to /24, which gives 256 pods per node
and 256 nodes, when assuming a /16 is used for the pod subnet.

For IPv6, the node CIDR prefix, is hard coded to /64. This does not work,
because the pod subnet prefix must be /66 or higher and must be a larger subnet
(lower value) than the node CIDR prefix.

In addition, the bit mask used to track the subnets (implying the number of
nodes), can only handle 32K entries, so the difference between pod subnet
prefix and node CIDR prefix cannot be more than 16 (bits).

To address this, the following algorithm is proposed to provide as many pods
per node as possible, and not exceed the number of nodes.

If the pod subnet prefix is from /66 to /104, we'll set the node CIDR prefix
to 16 more, so that the bit map is not exceeded. The rest of the bits will be
for pods per node.

If the subnet prefix is from /105 to /112, we'll split the available bits
between what is used for the nodes and what is used for the pods per node.
This will give a node CIDR prefix from /116 to /120.

If the subnet prefix is from /113 to /119, we'll do like IPv4 and ensure that
there are 256 pods per node, and the remaining bits will be for the nodes,
giving a node CIDR prefix of /120 always. This supports a limited number of
nodes, in some cases.

If the subnet prefix is /120 to /128, we don't have enough bits and will set
the node CIDR prefix to be the same as the pod subnet prefix. This will cause
a falure later, when it tests that the pod subnet prefix is larger than the
node CIDR prefi.



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-06 21:34:40 -08:00
Khaled Henidak(Kal) f9c8d7de9c auto generated items
remove ServiceSyncPeriod from tests

fixing tests
2018-02-07 03:26:51 +00:00
Walter Fender e18e8ec3c0 Add context to all relevant cloud APIs
This adds context to all the relevant cloud provider interface signatures.
Callers of those APIs are currently satisfied using context.TODO().
There will be follow on PRs to push the context through the stack.
For an idea of the full scope of this change please look at PR #58532.
2018-02-06 12:49:17 -08:00
Paul Michali fcd0ab1f6e IPv6: Ensure calculated node CIDR size for pod subnets is valid
With IPv4, the node CIDR prefix is set to /24, which gives 256 pods per node
and 256 nodes, when assuming a /16 is used for the pod subnet.

For IPv6, the node CIDR prefix, is hard coded to /64. This does not work,
because currently the pod subnet prefix must be /66 or higher and must be a
larger subnet (lower value) than the node CIDR prefix.

In addition, the bit mask used to track the subnets (implying the number of
nodes), can only handle 64K entries, so the difference between pod subnet
prefix and node CIDR prefix cannot be more than 16 (bits). The node CIDR
value needs to support this restriction.

To address this, the following algorithm is proposed...

For pod subnet prefixes of /113 or smaller, the remaining bits will be used
for the node CIDR, in multiples of 8, and 9-16 bits will be reserved for the
nodes, so that there are 512-64K nodes and 256, 512, 768, ... pods/node.

For example, with a pod network of /111, there will be 17 bits available. This
would give 8 bits for pods per node and 9 bits for nodes. The node CIDR would
be /120. For a pod network of /104, there will be 24 bits available. There will
be 8 bits for nodes, and 16 bits for pods/node, using a /112 node CIDR.

If the pod subnet prefix is /112, then the node CIDR will be set to /120, and
256 nodes and 256 pods/node will be available.

If the subnet prefix is /113 to /128, we don't have enough bits and will set
the node CIDR prefix to be the same as the pod subnet prefix. This will cause
a falure later, when it tests that the pod subnet prefix is larger than the
node CIDR prefix.
2018-02-06 20:13:17 +00:00
Kubernetes Submit Queue c628c1a9d4
Merge pull request #59306 from zhangxiaoyu-zidif/cleanup-require-kubeconfig
Automatic merge from submit-queue (batch tested with PRs 51323, 59306, 58991, 59050). 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>.

clean temporary para for require-kubeconfig

**What this PR does / why we need it**:
delete temporary require-kubeconfig

**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-02-06 10:40:34 -08:00
Kubernetes Submit Queue aa1849efc4
Merge pull request #58237 from xiangpengzhao/remove-v18-ac
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 defaultV18AdmissionControl in 1.10 cycle

**Release note**:

```release-note
NONE
```
2018-02-06 09:16:23 -08:00
Michalis Kargakis 0a9323c93a
Update generated code 2018-02-06 17:14:53 +01:00
Michalis Kargakis c3521845c6
Document kubeadm API 2018-02-06 17:04:46 +01:00
Kubernetes Submit Queue f611b32254
Merge pull request #59386 from ravisantoshgudimetla/fix-scheduler-config-file
Automatic merge from submit-queue (batch tested with PRs 59165, 59386). 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>.

Scheduler - not able to read from config file if configmap is not found

**What this PR does / why we need it**:
As of now, we are not able to read config file if configmap is not present.  As of now, the only way to make it work is to enable legacy mode which should not be the case.
xref: https://bugzilla.redhat.com/show_bug.cgi?id=1540785
**Release note**:

```release-note
Scheduler should be able to read from config file if configmap is not present.
```
/cc @bsalamat @ironcladlou
2018-02-05 23:50:34 -08:00
xiangpengzhao 37fdb823e7 Remove defaultV18AdmissionControl in 1.10 cycle 2018-02-06 15:23:57 +08:00
cheyang 4ca3903eab fix typo in kubeadm
Signed-off-by: cheyang <cheyang@163.com>
2018-02-06 13:48:18 +08:00
Kubernetes Submit Queue ab83d374df
Merge pull request #57754 from ncdc/fix-kube-proxy-config-docs-and-json-tags
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>.

kube-proxy: fix field name comments & json tags

**What this PR does / why we need it**: correct some minor issues in the comments and json tags for some of the fields in the kube-proxy config structs.

**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
The udpTimeoutMilliseconds field in the kube-proxy configuration file has been renamed to udpIdleTimeout. Action required: administrators need to update their files accordingly.
```

This was extracted from my currently unmerged f074b28fe9, as requested [here](https://github.com/kubernetes/kubernetes/pull/52198#pullrequestreview-85538637).

@kubernetes/sig-network-pr-reviews @luxas
2018-02-05 19:43:42 -08:00
zhangxiaoyu-zidif 890a41c9e8 clean temporary para for require-kubeconfig 2018-02-06 10:44:20 +08:00
ravisantoshgudimetla 34d35f1304 Scheduler is not able to read from config file if configmap is not present 2018-02-05 20:39:22 -05:00
Kubernetes Submit Queue 9ee71b720e
Merge pull request #59059 from smarterclayton/move_partial_object
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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 v1alpha1 meta to v1beta1

No code changes, just renames. We can discuss if there are any field / naming changes here or in a follow-up

Parent #58536
Fixes #53224
Prereq to #55637

@kubernetes/sig-api-machinery-pr-reviews @deads2k

```release-note
The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`.  Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`.  Older servers will ignore this representation or return an error if it is not available.  Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
```
2018-02-05 12:40:37 -08:00
Kubernetes Submit Queue ffda1e2200
Merge pull request #57017 from andyzhangx/azurefile-growsize
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 PV size grow feature for azure file

**What this PR does / why we need it**:
According to kubernetes/features#284, add size grow feature for azure file

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

**Special notes for your reviewer**:
Since azure file is using SMB 3.0 protocal, there is no necessary to resize filesystem on agent side, the agent node will detect the changed size automatically.

**Release note**:

```
add size grow feature for azure file
```
/sig azure
@gnufied @rootfs @brendandburns
2018-02-05 11:25:48 -08:00
Khaled Henidak(Kal) 359d8191f9 Remove --service-sync-period flag which was not in use 2018-02-05 18:16:27 +00:00
Jan Safranek c96c0495f4 Pass pod informer to PV controller 2018-02-05 15:40:25 +01:00
xiangpengzhao eaf58b66fa Update kubeadm supported etcd version to 3.2.14 in 1.10 2018-02-05 16:30:37 +08:00
Clayton Coleman 0346145615
Cap how long the kubelet waits when it has no client cert
If we go a certain amount of time without being able to create a client
cert and we have no current client cert from the store, exit. This
prevents a corrupted local copy of the cert from leaving the Kubelet in a
zombie state forever. Exiting allows a config loop outside the Kubelet
to clean up the file or the bootstrap client cert to get another client
cert.
2018-02-03 23:18:53 -05:00
Kubernetes Submit Queue 0f6354e81b
Merge pull request #58645 from jpbetz/etcd-server-3.2-upgrade
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 etcd server version to 3.2.14

This upgrades the default etcd version used by kubernetes to 3.2.14

We previously [bumped the etcd client to 3.2.14](https://github.com/kubernetes/kubernetes/pull/57480).

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

```release-note
Upgrade default etcd server version to 3.2.14
```

cc @gyuho
2018-02-02 20:27:29 -08:00
Kubernetes Submit Queue 230726ffbe
Merge pull request #59251 from BenTheElder/patch-for-bazel-0.10
Automatic merge from submit-queue (batch tested with PRs 55606, 59185, 58763, 59072, 59251). 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>.

patch cmd/kubeadm/test/cmd/BUILD for bazel 0.10

**What this PR does / why we need it**: Fixes `//cmd/kubeadm/test/cmd:go_default_test` failure with Bazel `0.10.0` (just released). 

This should be enough to let us upgrade to Bazel `0.10.0` which has some very useful improvements.

**Special notes for your reviewer**: Example failure when canary testing `0.10.0`: https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/46662/pull-kubernetes-bazel-test-canary/124/#cmdkubeadmtestcmdgo_default_test 

**Release note**:
```release-note
NONE
```
2018-02-02 18:26:44 -08:00
Joe Betz f0d04b7131 Update etcd server version to 3.2.13 2018-02-02 17:25:13 -08:00
Benjamin Elder 26442cfb6c patch cmd/kubeadm/test/cmd/BUILD for bazel 0.10 2018-02-02 11:14:43 -08:00
Clayton Coleman d07a608607 Promote v1alpha1 meta to v1beta1
No code changes, just renames
2018-02-02 14:00:45 -05:00
Kubernetes Submit Queue d4064ac3cc
Merge pull request #58802 from dixudx/fix_crictl_preflight
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>.

kubeadm init: skip checking cri socket in preflight checks

**What this PR does / why we need it**:
`kubeadm init` does not need to require `dockershim.sock` to be present.
Remove the check for `dockershim.sock`.
xref #55055

**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 kubernetes/kubeadm#657

**Special notes for your reviewer**:
/area kubeadm
/kind bug
/assign @luxas 
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews 

**Release note**:

```release-note
kubeadm init: skip checking cri socket in preflight checks
```
2018-02-02 09:46:44 -08:00
Di Xu 00bf985785 kubeadm init: skip checking cri socket in preflight checks 2018-02-02 17:15:33 +08:00
Kubernetes Submit Queue d3b783d5ec
Merge pull request #58743 from NickrenREN/pv-protection
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>.

Postpone PV deletion with finalizer when it is being used

Postpone PV deletion if it is bound to a PVC

xref: https://github.com/kubernetes/community/pull/1608


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

**Special notes for your reviewer**:

**Release note**:
```release-note
Postpone PV deletion when it is being bound to a PVC
```

WIP, assign to myself first

/assign @NickrenREN
2018-02-01 19:39:52 -08: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
steveperry-53 1a530d1884 Add IPv6 to ref page descriptions. 2018-02-01 19:29:54 +00:00
Kubernetes Submit Queue c549dc7b4c
Merge pull request #59099 from karataliu/credflag
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 call to addCredentialProviderFlags

**What this PR does / why we need it**:
Credential flags such as 'azure-container-registry-config' are still in use, call addCredentialProviderFlags to hook it up.

See:
https://github.com/kubernetes/kubernetes/pull/56995#issuecomment-361483382

**Which issue(s) this PR fixes**
Follow up of #56995 

**Special notes for your reviewer**:
/assign  @mtaufen @liggitt

**Release note**:
```release-note
NONE
```
2018-02-01 10:43:35 -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
Kubernetes Submit Queue f96ac05774
Merge pull request #59062 from mtaufen/fix-pod-pids-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>.

Fix PodPidsLimit and ConfigTrialDuration on internal KubeletConfig type

They should both follow the convention of not being a pointer on the internal type. 

This required adding a conversion function between `int64` and `*int64`. A side effect is this removes a warning in the generated code for the apps API group.

@dims

```release-note
NONE
```
2018-02-01 01:45:55 -08:00
Kubernetes Submit Queue 1cd2b7372b
Merge pull request #57788 from rajansandeep/upstream
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>.

Include `upstream` option in CoreDNS

**What this PR does / why we need it**:
Including `upstream` as a default in the manifest and keep in sync with the default CoreDNS manifest.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-31 15:27:27 -08:00
Zihong Zheng 316c3696df kube-proxy: Fix flag validation for healthz-bind-address and metrics-bind-address 2018-01-31 14:02:30 -08:00
Kubernetes Submit Queue 0cdd940ff6
Merge pull request #58815 from bart0sh/PR0002-join-checks
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>.

Fix adding FileContentCheck

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

Current code adds FileContentCheck only for the first API
Server mentioned in the command line. The test is never added
as net.ParseIP always fails because address:port is passed
to it instead of just an address.

Fixed both issues by introducing a loop over all API Servers
and splitting address:port before passing address to the
net.ParseIP API.

**Release note**:
```release-note
NONE
```
2018-01-31 10:54:50 -08:00
Sandeep Rajan 2853738a6b add upstream
add pod affinity
2018-01-31 13:31:58 -05:00
hzxuzhonghu 2742d1e42d refactor kube-aggregator api group install 2018-01-31 21:38:47 +08:00
NickrenREN 3fee293607 Add PV protection controller 2018-01-31 20:18:54 +08:00
NickrenREN 2a2f88b939 Rename PVCProtection feature gate so that PV protection can share the feature gate with PVC protection 2018-01-31 20:02:01 +08:00
NickrenREN d45a41807e Add Beta VolumeAttachment API 2018-01-31 17:38:11 +08:00
Dong Liu 68f03d4e78 Add call to addCredentialProviderFlags 2018-01-31 16:10:46 +08:00
Lee Briggs ff607743a3
Change manifest file perms to remove execute 2018-01-30 14:28:26 -08:00
Michael Taufen da41a6e793 Fix PodPidsLimit and ConfigTrialDuration on internal KubeletConfig type
They should both follow the convention of not being a pointer on the
internal type. This required adding a conversion function between
`int64` and `*int64`.

A side effect is this removes a warning in the generated code for the
apps API group.
2018-01-30 11:43:41 -08:00
Kubernetes Submit Queue 9e2878d93c
Merge pull request #58567 from hzxuzhonghu/admission-01
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>.

kube-apiserver flag --admision-control is deprecated, use the new --e…

…nable-admission-plugins



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

1. As #58123 mark kube-apiserver flag `admission-control` deprecated,  replace it in some places.

**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
```
/assign @liggitt @deads2k @sttts
2018-01-30 09:21:38 -08:00
Ed Bartosh c6c82351a7 Remove port from HTTPProxyCheck
This check doesn't use port. It uses proxy related variables
(HTTP_PROXY, NO_PROXY, etc) that only operate with protocol
and host.

Removing port from the check should make it more clear for
user that port is not used as it will not be present in
the check output.
2018-01-30 19:02:42 +02:00
andyzhangx fc988d429b initial work for azure file grow size implementation
enable azure file grow size

fix according to comments

fix comments

fix review comments

fix comments
2018-01-30 13:36:29 +00:00
hzxuzhonghu 24c687fdad deprecate insecure http flags and remove already deprecated public-address-override 2018-01-30 16:05:33 +08:00
Michael Taufen 4258926640 Kubelet flags take precedence
This changes the Kubelet configuration flag precedence order so that
flags take precedence over config from files/ConfigMaps.

See #56171 for rationale.

Note: Feature gates accumulate with the following
precedence (greater number overrides lesser number):
1. file-based config
2. dynamic cofig
3. flag-based config
2018-01-29 10:07:37 -08:00
Kubernetes Submit Queue 6def29e004
Merge pull request #58367 from zhangxiaoyu-zidif/do-issue-41161
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 deprecated --require-kubeconfig flag, remove default --kubeconfig value

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove deprecated --require-kubeconfig flag, remove default --kubeconfig value
```
2018-01-29 06:47:08 -08:00
tengqm 887c48a597 Expose default service IP CIDR in apiserver 2018-01-29 16:21:04 +08:00
zhangxiaoyu-zidif aaf0745a63 add RequireKubeConfig back for pull-kubernetes-e2e-kops-aws 2018-01-29 13:05:12 +08:00
Kubernetes Submit Queue ac495f169b
Merge pull request #58644 from yguo0905/webhooks
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>.

Use SSH tunnel for webhook communication iff the webhook is deployed as a service

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

We are getting the following error when the apiserver connects the webhook on localhost (configured via URL). We should only use the SSL tunnel for the connections to nodes when the webhooks are running as services.

```
I0119 17:41:18.678436       1 ssh.go:400] [4cdf44753cc3705d: localhost:10258] Dialing...
W0119 17:41:18.678483       1 ssh.go:424] SSH tunnel not found for address "localhost", picking random node
I0119 17:41:18.679810       1 ssh.go:402] [4cdf44753cc3705d: localhost:10258] Dialed in 1.398691ms.
W0119 17:41:18.679928       1 admission.go:256] Failed calling webhook, failing closed xxx: failed calling admission webhook "xxx": Post xxx: ssh: rejected: connect failed (Connection refused)
I0119 17:41:18.680346       1 wrap.go:42] POST /api/v1/namespaces/kube-system/pods: (5.725588ms) 500
```

**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 # https://github.com/kubernetes/kubernetes/issues/58779

**Special notes for your reviewer**:

**Release note**:

```release-note
kube-apiserver is changed to use SSH tunnels for webhook iff the webhook is not directly routable from apiserver's network environment.
```

/assign @lavalamp @caesarxuchao @cheftako
2018-01-26 15:58:27 -08:00
Kubernetes Submit Queue 5792214647
Merge pull request #58760 from mtaufen/kc-remove-kubeletconfigfile-gate
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>.

Removal of KubeletConfigFile feature gate: Step 1

This feature gate was redundant with the `--config` flag, which already
enables/disables loading Kubelet config from a file.

Since the gate guarded an alpha feature, removing it is not a violation
of our API guidelines.

Some stuff in `kubernetes/test-infra` currently sets the gate,
so removing will be a 3 step process:
1. This PR, which makes the gate a no-op.
2. Stop setting the gate in `kubernetes/test-infra`.
3. Completely remove the gate (this PR will get the release note).

```release-note
NONE
```
2018-01-26 14:35:25 -08:00
Yang Guo 05fbc22064 Split ClientConfigFor() 2018-01-26 11:51:19 -08:00
Chuck Ha 265a57c11f
Adds breadcrumb to crictl warning
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-01-26 13:06:12 -05:00
Kubernetes Submit Queue 6177b42e62
Merge pull request #58408 from deads2k/hyperkube-01-fix
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>.

switch hyperkube to cobra

This makes use of cobra to layer the commands with a library that already supports composing commands.

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

```release-note
NONE
```
2018-01-26 08:23:01 -08:00
Kubernetes Submit Queue c21173d0ea
Merge pull request #55792 from dhilipkumars/statefulset-appsv1
Automatic merge from submit-queue (batch tested with PRs 55792, 58342). 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 Statefulset controller and its e2e tests to use apps/v1

**What this PR does / why we need it**: 
Promotes the statefulset controller to use to use the latest apps group [apps/v1](https://github.com/kubernetes/kubernetes/pull/53679)


**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 # https://github.com/kubernetes/kubernetes/issues/55714

**Special notes for your reviewer**:

* Listerexpansion for v1 `k8s.io/client-go/listers/apps/v1`  (was recently done for v1beta2)

* `v1beta2` && `v1` had `ObservedGeneration` as `int64` where as `v1beta1` and rest of the code (including conversion) is expecting `ObservedGeneration` to be  `*int64`

```
type StatefulSetStatus struct {
	// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
	// StatefulSet's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
```

* for kubectl's `rollback` and `history` commands a couple functions have been duplicated to allow us to use `v1` version instead of `v1beta1` for statefulsets, while the older functions are still used by other controllers.  

We should be able to remove these duplicates once all the controllers are moved. 

If this aligns with the plan then i could move other controllers too. 

cc: @kow3ns 

**Release note**:

```release-note
NONE
```
2018-01-26 06:54:33 -08:00
Kubernetes Submit Queue 31e1157617
Merge pull request #58518 from l2dy/master
Automatic merge from submit-queue (batch tested with PRs 58518, 58771, 58101, 56829). 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 typo

**What this PR does / why we need it**:
Fix a typo (evalutated -> evaluated).
**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**:
I didn't touch pkg/generated/bindata.go and k8s.mo. Should I regenerate them in this PR?
**Release note**:

```release-note
NONE
```
2018-01-26 01:03:32 -08:00
Jordan Liggitt e4f3232e54
Prefer apps/v1 storage for daemonsets, deployments, replicasets 2018-01-26 00:37:08 -05:00
Kubernetes Submit Queue bf111161b7
Merge pull request #57973 from dims/set-pids-limit-at-pod-level
Automatic merge from submit-queue (batch tested with PRs 57973, 57990). 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>.

Set pids limit at pod level

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

Add a new Alpha Feature to set a maximum number of pids per Pod.
This is to allow the use case where cluster administrators wish
to limit the pids consumed per pod (example when running a CI system).

By default, we do not set any maximum limit, If an administrator wants
to enable this, they should enable `SupportPodPidsLimit=true` in the
`--feature-gates=` parameter to kubelet and specify the limit using the
`--pod-max-pids` parameter.

The limit set is the total count of all processes running in all
containers in the pod.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
New alpha feature to limit the number of processes running in a pod. Cluster administrators will be able to place limits by using the new kubelet command line parameter --pod-max-pids. Note that since this is a alpha feature they will need to enable the "SupportPodPidsLimit" feature.
```
2018-01-25 18:29:31 -08:00
Kubernetes Submit Queue a9927ab6fd
Merge pull request #58378 from chentao1596/delete-redundant-symbols
Automatic merge from submit-queue (batch tested with PRs 53778, 58378, 58830). 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>.

Delete redundant symbols

**What this PR does / why we need it**:
2018-01-25 17:09:34 -08:00
Kubernetes Submit Queue 49532f59a6
Merge pull request #58791 from mikedanese/jwt0
Automatic merge from submit-queue (batch tested with PRs 58626, 58791). 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>.

serviceaccount: check token is issued by correct iss before verifying

Right now if a JWT for an unknown issuer, for any subject hits the
serviceaccount token authenticator, we return a errors as if the token
was meant for us but we couldn't find a key to verify it. We should
instead return nil, false, nil.

This change helps us support multiple service account token
authenticators with different issuers.

https://github.com/kubernetes/kubernetes/issues/58790

```release-note
NONE
```
2018-01-25 14:06:37 -08:00
Kubernetes Submit Queue ab788d2312
Merge pull request #58302 from deads2k/controller-05-id
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>.

uniquify resource lock identities

Resource lock identities on the same host were not unique.  This keeps the hostname (that's valuable), but also adds a UUID so that you can start a process twice on the same host and not end up with two processes trying to lead.

@kubernetes/sig-api-machinery-bugs @liggitt @smarterclayton
2018-01-25 11:29:40 -08:00
Ed Bartosh d503b807d5 Fix adding FileContentCheck
Current code adds FileContentCheck only for the first API
Server mentioned in the command line. The test is never added
as net.ParseIP always fails because <address>:<port> is passed
to it instead of <address>.

Fixed both issues by introducing a loop over all API Servers
and splitting <address>:<port> before passing <address> to the
net.ParseIP API.
2018-01-25 17:22:15 +02:00
Mike Danese 057b7af798 serviceaccount: check token is issued by correct iss before verifying
Right now if a JWT for an unknown issuer, for any subject hits the
serviceaccount token authenticator, we return a errors as if the token
was meant for us but we couldn't find a key to verify it. We should
instead return nil, false, nil.

This change helps us support multiple service account token
authenticators with different issuers.
2018-01-24 20:21:59 -08:00
Kubernetes Submit Queue 7687b11771
Merge pull request #58259 from dims/support-external-cloud-providers
Automatic merge from submit-queue (batch tested with PRs 58259, 58664). 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>.

Support out-of-tree / external cloud providers

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

Currently kubeadm fails in preflight check. We should allow external cloud providers
```
[preflight] Starting the kubelet service
cloudprovider: Invalid value: "external": cloudprovider not supported
```

**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
Added support for external cloud providers in kubeadm
```
2018-01-24 11:00:36 -08:00
Michael Taufen 6443b6f543 Removal of KubeletConfigFile feature gate: Step 1
This feature gate was redundant with the `--config` flag, which already
enables/disables loading Kubelet config from a file.

Since the gate guarded an alpha feature, removing it is not a violation
of our API guidelines.

Some stuff in `kubernetes/test-infra` currently sets the gate,
so removing will be a 3 step process:
1. This PR, which makes the gate a no-op.
2. Stop setting the gate in `kubernetes/test-infra`.
3. Completely remove the gate.
2018-01-24 10:19:15 -08:00
David Eads e48847e6ce switch hyper to cobra 2018-01-24 11:02:19 -05:00
hzxuzhonghu 0a230fad17 kube-apiserver flag --admision-control is deprecated, use the new --enable-admission-plugins 2018-01-24 20:47:54 +08:00
Yang Guo 454276c23c Use SSH tunnel for webhook communication iff the webhook is deployed as a service 2018-01-23 14:31:09 -08:00
David Eads 972693cffe generated 2018-01-23 14:11:49 -05:00
David Eads 9baae557da add apiregistration v1 2018-01-23 14:11:49 -05:00
Kubernetes Submit Queue 3550551b9f
Merge pull request #58528 from deads2k/kubelet-02-mincipher
Automatic merge from submit-queue (batch tested with PRs 58547, 57228, 58528, 58499, 58618). 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 TLS min version flag

Adds a flag for controlling the minimum TLS level allowed.

/assign liggitt

@kubernetes/sig-node-pr-reviews @k8s-mirror-api-machinery-pr-reviews 

```release-note
--tls-min-version on kubelet and kube-apiserver allow for configuring minimum TLS versions
```
2018-01-22 20:49:35 -08:00
Davanum Srinivas f302307437 Support out-of-tree / external cloud providers 2018-01-22 09:04:45 -05:00
hzxuzhonghu eff1f20ff1 run update bazel and staging-godep 2018-01-22 19:10:28 +08:00
hzxuzhonghu 2f403b7ad1 pass APIEnablement through apiserver chain 2018-01-22 19:10:26 +08:00