Commit Graph

4948 Commits (094116ac9a0f5794881792db1be21099b510f4cf)

Author SHA1 Message Date
Yu-Ju Hong 3837a016ef kubelet: remove the --docker-exec-handler flag
Stop supporting the "nsenter" exec handler. Only the Docker native exec
handler is supported.

The flag was deprecated in Kubernetes 1.6 and is safe to remove
in Kubernetes 1.9 according to the deprecation policy.
2017-09-22 12:13:31 -07:00
Lucas Käldström 81840b3782
Use the release-1.8 branch by default 2017-09-22 21:03:28 +03:00
Lucas Käldström 4360911d89
Fake out the kubernetes version in phase testing in order to avoid resolving things manually (which can lead to flakes) 2017-09-22 21:03:16 +03:00
NickrenREN 39c48d3605 remove rackspace related code 2017-09-22 18:06:50 +08:00
Kubernetes Submit Queue 04673ab614 Merge pull request #52618 from dims/deprecate-pvl-admission-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>..

deprecate warning for persistent volume admission controller

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

deprecate warning for persistent volume admission controller

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

Fixes #52617

**Special notes for your reviewer**:

**Release note**:

```release-note
PersistentVolumeLabel admission controller is now deprecated.
```
2017-09-21 22:04:55 -07:00
Jeff Grafton 02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton 532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Davanum Srinivas cf3fe0b5d4 deprecate warning for persistent volume admission controller 2017-09-21 14:36:29 -04:00
xiangpengzhao af09159419 Add version info to kube-scheduler, kube-proxy and kubelet logs. 2017-09-21 17:46:24 +08:00
Kubernetes Submit Queue a16a126f41 Merge pull request #51064 from madhanrm/winkernelproxy
Automatic merge from submit-queue (batch tested with PRs 51064, 52132). 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 Kubeproxy to work for Windows Kernel mode

**What this PR does / why we need it**:
Kubeproxy doenst work for with windows kernel mode. This PR adds a Kernel Proxy for windows to use the underlying platform features.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
#49666
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-09-20 14:32:55 -07:00
Dong Liu 5af2ac5344 Add comment for controller manager default values 2017-09-20 15:53:22 +08:00
Jeff Grafton 2bc88a813f bazel: make //cmd/kubectl:kubectl binary publicly visible 2017-09-18 17:18:34 -07:00
Madhan Raj Mookkandy a8d797afdd Add exception to golint check
(*) Fix cleanup of NodePort resources. (*) Fix the logic to select existing policies

Fix review comment

Fix Bazel

Update GoDep License

Fix NodePort forwarding to target port

Fix Darwin Build break. +1

Implement IsCompatible to validate kernel support for kernel mode
2017-09-18 11:11:22 -07:00
Dong Liu 7f52438dea Add default value for RouteReconciliationPeriod in cloud controller manager 2017-09-18 13:17:14 +08:00
Clayton Coleman 748172f94e
Some kubelet flags do not accept their default values
Correct the flags and add a round trip test that ensure these do not
break again in the future.
2017-09-16 16:20:00 -04:00
Kubernetes Submit Queue 3277de69b4 Merge pull request #52176 from liggitt/heartbeat-timeout
Automatic merge from submit-queue (batch tested with PRs 52176, 43152). 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>..

Eliminate hangs/throttling of node heartbeat

Fixes https://github.com/kubernetes/kubernetes/issues/48638
Fixes #50304

Stops kubelet from wedging when updating node status if unable to establish tcp connection.

 Notes that this only affects the node status loop. The pod sync loop would still hang until the dead TCP connections timed out,  so more work is needed to keep the sync loop responsive in the face of network issues, but this change lets existing pods coast without the node controller trying to evict them

```release-note
kubelet to master communication when doing node status updates now has a timeout to prevent indefinite hangs
```
2017-09-16 09:45:29 -07:00
Kubernetes Submit Queue d3731ddb8b Merge pull request #52576 from fabriziopandini/fixAddonPhase
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 Kubeadm phase addon regression

What this PR does / why we need it:
fix Kubeadm phase addon regression

Special notes for your reviewer:
CC @luxas
2017-09-16 08:14:03 -07:00
Kubernetes Submit Queue 3899491d2b Merge pull request #52524 from karataliu/ccm_clustername
Automatic merge from submit-queue (batch tested with PRs 52486, 52588, 52524). 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 cluster-name option for cloud controller manager

**What this PR does / why we need it**:
`cluster-name` is used by servicecontroller and routecontroller, for controller-manager, we have a parameter to set it, but for cloud-controller-manager, it will always be of default value 'kubernetes'.

An example of impact is Azure's loadbalancer, the loadbalancer resource created will always have the name 'kubernetes', while it used to be the cluster name set via controller manger's option.

**Which issue this PR fixes**
Fixes #52522

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-09-16 06:34:27 -07:00
Serguei Bezverkhi 834a02e673 Switching to apps/v1beta2
Closes https://github.com/kubernetes/kubeadm/issues/390
2017-09-15 18:48:17 -04:00
fabriziopandini d21040b8e6 fix addon error 2017-09-16 00:03:35 +02:00
Alexander Kanevskiy d5098c1624 Remove warning about changes in default token TTLs
It was planned for 1.9 cleanup to remove that warning, as change was
done few release cycles ago and users should be already aware of it.

Closes: kubernetes/kubeadm#346
2017-09-15 16:50:58 +03:00
Dong Liu a53b0c3f34 Add cluster name option for cloud controller manager 2017-09-15 14:00:06 +08:00
Madhan Raj Mookkandy 63020d5f72 Vendor changes
Vendoring (NEW) in github.com/Microsoft/hcsshim
2017-09-14 16:00:07 -07:00
Madhan Raj Mookkandy 5b87513972 Fix Bazel build 2017-09-14 15:50:47 -07:00
Madhan Raj Mookkandy f503755e53 Add Windows Kernel Proxy support
Windows Kernel now exposes "Internal Load Balancing"
	using VFP (Virtual Filtering Platform) part of Virtual Switch. An inbuild
	windows service HNS (Host Networking Service) acts as interface to program
	the VFP. VFP is synonymous to iptables in functionality. HNS uses json based
	data as input.

	With the help of the interface available in github.com/Microsoft/hcsshim,
	these APIs are exposed to the world in github to program HNS and use
	the feature.

	*** More info about the changes in this PR ***
	(1) For every endpoint available in the system, an HNS Endpoint is added
	    (1.a) for local endpoints, a local HNS Endpoint would already exist, as part of
            container creation.
	    (1.b) For all remote endpoints, a remote HNS Endpoint is created via HNS

	(2) For every Service, a HNS ILB LoadBalancer is added referring the endpoints
	    created in (1)
		Sample Input to HNS:
		{
 	       "Policies":  [
        	                 {
                	             "ExternalPort":  80,
                        	     "InternalPort":  80,
	                             "Protocol":  6,
        	                     "Type":  "ELB",
                	             "VIPs":  [
                        	                  "11.0.98.129"
                                	      ]
	                         }
        	             ],
	        "References":  [
                           "/endpoints/ca8b877b-ab90-499a-bc0e-7d736c425632",
                           "/endpoints/ee0ef08b-8434-4f8b-b748-393884e77465"
        		]
    		}

	(2-a) This is done for Cluster IP, LoadBalancer Ingress IP, NodePort, External IP

	Following the regular service and endpoint updates,
	the HNS is notified of the updates and the system is kept in sync.
2017-09-14 15:50:47 -07:00
Chao Xu 186a0684d5 plumb the proxyTransport to the webhook admission plugin;
set the ServerName in the config for webhook admission plugin.
2017-09-14 15:35:12 -07:00
Kubernetes Submit Queue d9615b2fd1 Merge pull request #52376 from nicksardo/fix-cloudprovider-initialization
Automatic merge from submit-queue (batch tested with PRs 52376, 52439, 52382, 52358, 52372)

Pass correct clientbuilder to cloudproviders

Fixes https://github.com/kubernetes/kubeadm/issues/425 by moving the Initialize call to after the start of the token controller and passing `clientBuilder` instead of `rootClientBuilder` to the cloudproviders.

/assign @bowei 

**Release note**:
```release-note
NONE
```

Should fix in 1.8 and cherrypick to 1.7
2017-09-14 15:26:57 -07:00
Jordan Liggitt f8f57d8959
Use separate client for node status loop 2017-09-14 15:56:22 -04:00
Nick Sardo e73dfce32f Move cloudprovider initialization to after token controller and use
clientBuilder
2017-09-13 10:57:35 -07:00
Kubernetes Submit Queue e1b446f873 Merge pull request #52362 from fabriziopandini/kubeadm436
Automatic merge from submit-queue (batch tested with PRs 51601, 52153, 52364, 52362, 52342)

fix kubeadm token create error

**What this PR does / why we need it**:
fix kubeadm token create error

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

**Special notes for your reviewer**:
CC @luxas
2017-09-13 09:30:15 -07:00
Kubernetes Submit Queue e36b4fdaa8 Merge pull request #52364 from fabriziopandini/kubeadm437
Automatic merge from submit-queue (batch tested with PRs 51601, 52153, 52364, 52362, 52342)

fix Kubeadm phase addon error

What this PR does / why we need it:
fix Kubeadm phase addon error

Which issue this PR fixes
[#437](https://github.com/kubernetes/kubeadm/issues/437)

Special notes for your reviewer:
CC @luxas @andrewrynhard
2017-09-13 09:30:11 -07:00
Kubernetes Submit Queue 2ed6e53183 Merge pull request #52153 from lukemarsden/tweak-kubeadm-intro-text
Automatic merge from submit-queue (batch tested with PRs 51601, 52153, 52364, 52362, 52342)

Improve kubeadm help text

* Replace 'misc' with more specific at-mentions bugs and feature-requests.
* Replace ReplicaSets with Deployments as example, because ReplicaSets are dated.
* Generalize join example.

Before:

```
    ┌──────────────────────────────────────────────────────────┐
    │ KUBEADM IS BETA, DO NOT USE IT FOR PRODUCTION CLUSTERS!  │
    │                                                          │
    │ But, please try it out! Give us feedback at:             │
    │ https://github.com/kubernetes/kubeadm/issues             │
    │ and at-mention @kubernetes/sig-cluster-lifecycle-misc    │
    └──────────────────────────────────────────────────────────┘

Example usage:

    Create a two-machine cluster with one master (which controls the cluster),
    and one node (where your workloads, like Pods and ReplicaSets run).

    ┌──────────────────────────────────────────────────────────┐
    │ On the first machine                                     │
    ├──────────────────────────────────────────────────────────┤
    │ master# kubeadm init                                     │
    └──────────────────────────────────────────────────────────┘

    ┌──────────────────────────────────────────────────────────┐
    │ On the second machine                                    │
    ├──────────────────────────────────────────────────────────┤
    │ node# kubeadm join --token=<token> <ip-of-master>:<port> │
    └──────────────────────────────────────────────────────────┘

    You can then repeat the second step on as many other machines as you like.
```

After (changes highlighted with `<--`):

```
    ┌──────────────────────────────────────────────────────────┐
    │ KUBEADM IS BETA, DO NOT USE IT FOR PRODUCTION CLUSTERS!  │
    │                                                          │
    │ But, please try it out! Give us feedback at:             │
    │ https://github.com/kubernetes/kubeadm/issues             │
    │ and at-mention @kubernetes/sig-cluster-lifecycle-bugs    │ <--
    │ or @kubernetes/sig-cluster-lifecycle-feature-requests    │ <--
    └──────────────────────────────────────────────────────────┘

Example usage:

    Create a two-machine cluster with one master (which controls the cluster),
    and one node (where your workloads, like Pods and Deployments run).  <--

    ┌──────────────────────────────────────────────────────────┐
    │ On the first machine                                     │
    ├──────────────────────────────────────────────────────────┤
    │ master# kubeadm init                                     │
    └──────────────────────────────────────────────────────────┘

    ┌──────────────────────────────────────────────────────────┐
    │ On the second machine                                    │
    ├──────────────────────────────────────────────────────────┤
    │ node# kubeadm join <arguments-returned-from-init>        │ <--
    └──────────────────────────────────────────────────────────┘

    You can then repeat the second step on as many other machines as you like.

```

cc @luxas
2017-09-13 09:30:06 -07:00
m1093782566 8487b1653e ut test load ipvs config 2017-09-13 17:03:26 +08:00
wackxu 2070aa6b1f remove unless healthz.DefaultHealthz() in controller-manager 2017-09-13 16:40:14 +08:00
Malcolm Lee 69ce9abf92 remove repeated import'k8s.io/client-go/kubernetes' in controllermanager.go 2017-09-13 11:22:50 +08:00
fabriziopandini 56d830776b fix Kubeadm phase addon 2017-09-12 23:52:20 +02:00
fabriziopandini 36562db310 fix kubeadm token create error 2017-09-12 23:30:14 +02:00
Kubernetes Submit Queue a4b7100c20 Merge pull request #52007 from oracle/for/upstream/master/ccm-sa-run-jitter
Automatic merge from submit-queue (batch tested with PRs 52007, 52196, 52169, 52263, 52291)

Fixed CCM service controller start jitter

**What this PR does / why we need it**: The start jitter for the service controller was running regardless if the service controller was being ran. This should help startup time for CCM's without the service controller implementation. 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/cc @wlan0 @andrewsykim @luxas @jhorwit2

/area cloudprovider
/sig cluster-lifecycle
2017-09-12 08:46:05 -07:00
Kubernetes Submit Queue 13b9c9afd3 Merge pull request #52306 from luxas/kubeadm_selfhosting_alpha
Automatic merge from submit-queue (batch tested with PRs 52119, 52306)

kubeadm: Mark self-hosting alpha in v1.8

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

Self-hosting is alpha in v1.8, not beta. We targeted it to be beta, hence the initial add of this feature gates' value, but now changing back to alpha.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-09-12 05:50:25 -07:00
Kubernetes Submit Queue ae8780f5ce Merge pull request #50289 from liggitt/cloud-controller-manager
Automatic merge from submit-queue (batch tested with PRs 50289, 52106)

Honor --use-service-account-credentials in cloud-controller-manager

If --use-service-account-credentials is specified, the cloud controller manager should honor it

The distinction between the rootclientbuilder and the clientbuilder came from kube-controller-manager, which is responsible for running the very controllers that enable service accounts. That two-layer approach is not needed in the cloud-controller-manager.

```release-note
The `kube-cloud-controller-manager` flag `--service-account-private-key-file` was non-functional and is now deprecated.
The `kube-cloud-controller-manager` flag `--use-service-account-credentials` is now honored consistently, regardless of whether `--service-account-private-key-file` was specified.
```
2017-09-12 03:44:15 -07:00
Lucas Käldström 09d7e73ae5
kubeadm: Mark self-hosting alpha in v1.8 2017-09-11 22:12:53 +03:00
p0lyn0mial 7a92947588 adds two new fields to AdmissionOption.
The first one being RecommendedPluginOrder the second one being DefaultOffPlugins.
In case a cluster-admin did not provide plugin names they will be derived from these fields.
2017-09-11 17:47:57 +02:00
Ryan Phillips d1bb08f44a add lease endpoint reconciler
fixes kubernetes/community#939
fixes kubernetes/kubernetes#22609
2017-09-11 10:42:36 -05:00
mattjmcnaughton 8323fb4b4f Modify `apimachinery` imports using `staging`
Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-10 10:19:30 -04:00
Feng Min e5d205717b Add more test coverage for kubeadm uploadconfig especially with idempotent case. 2017-09-08 16:47:49 -07:00
Kubernetes Submit Queue 46c7ec209a Merge pull request #52188 from luxas/kubeadm_fix_join_v17
Automatic merge from submit-queue (batch tested with PRs 50949, 52155, 52175, 52112, 52188)

kubeadm: Perform TLS Bootstrapping in kubeadm join for v1.7 kubelets

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

Partially reverts 9dc3a661d7
Performs the TLS Bootstrap if `kubeadm join` v1.8 is executed on a node with a kubelet v1.7.
Since the kubelet arguments for v1.7 (from the kubeadm dropin) expects a TLS bootstrapped kubeconfig, we still have to provide this functionality in kubeadm CLI v1.8 (as we support one minor version down)

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

fixes: https://github.com/kubernetes/kubeadm/issues/429

**Special notes for your reviewer**:

This is a required bug fix for v1.8

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-09-08 15:11:33 -07:00
Lucas Käldström 136d68b4d5
kubeadm: Perform TLS Bootstrapping in kubeadm join for v1.7 kubelets but not v1.8 ones 2017-09-08 22:29:11 +03:00
Clayton Coleman fc2d201e15
Allow watch cache to be disabled per type
Currently setting watch cache size for a given resource does not disable
the watch cache. This commit adds a new `default-watch-cache-size` flag
to map to the existing field, and refactors how watch cache sizes are
calculated to bring all of the code into one place. It also adds debug
logging to startup to allow us to verify watch cache enablement in
production.
2017-09-08 13:42:28 -04:00
Dr. Stefan Schimanski d99c7df360 kube-aggregator: use shared informers from RecommendedConfig 2017-09-08 16:12:54 +02:00
Dr. Stefan Schimanski 2b64d3a0fd apiserver: split core API creation from secure serving 2017-09-08 14:38:11 +02:00
Lucas Käldström 976d5c3438
Revert commit 9dc3a661d7 2017-09-08 15:19:18 +03:00
Dr. Stefan Schimanski ca3f745346 apiserver: stratify versioned informer construction 2017-09-08 14:16:09 +02:00
Dr. Stefan Schimanski 7d09148ad7 apiserver: separate apiserver specific configs into ExtraConfig 2017-09-08 14:16:09 +02:00
Luke Marsden 60a16cfedd Replace 'misc' with more specific at-mentions bugs and feature-requests. Replace ReplicaSets with Deployments as example, because ReplicaSets are dated. Generalize join example. 2017-09-08 09:22:07 +01:00
Jordan Liggitt 3cf760c57e
Change TimeAdded to pointer 2017-09-07 14:13:09 -04:00
Lucas Käldström 74954fdae9
kubeadm: Set the new BT auth group on the init token 2017-09-07 15:27:58 +03:00
Kubernetes Submit Queue ea017719e5 Merge pull request #51171 from andrewrynhard/proxy-dns-phase
Automatic merge from submit-queue

kubeadm: add `kubeadm phase addons` command

**What this PR does / why we need it**:
Adds the `addons` phase command to `kubeadm`

fixes: https://github.com/kubernetes/kubeadm/issues/418

/cc @luxas
2017-09-07 00:03:15 -07:00
Kubernetes Submit Queue b6545a086c Merge pull request #51728 from derekwaynecarr/cadvisor-stats
Automatic merge from submit-queue (batch tested with PRs 51728, 49202)

Enable CRI-O stats from cAdvisor

**What this PR does / why we need it**:
cAdvisor may support multiple container runtimes (docker, rkt, cri-o, systemd, etc.)

As long as the kubelet continues to run cAdvisor, runtimes with native cAdvisor support may not want to run multiple monitoring agents to avoid performance regression in production.  Pending kubelet running a more light-weight monitoring solution, this PR allows remote runtimes to have their stats pulled from cAdvisor when cAdvisor is registered stats provider by introspection of the runtime endpoint.

See issue https://github.com/kubernetes/kubernetes/issues/51798

**Special notes for your reviewer**:
cAdvisor will be bumped to pick up https://github.com/google/cadvisor/pull/1741

At that time, CRI-O will support fetching stats from cAdvisor.

**Release note**:
```release-note
NONE
```
2017-09-06 20:00:57 -07:00
Andrew Rynhard d55cea629f kubeadm: add addons command 2017-09-06 19:54:04 -07:00
huangjiuyuan 48b71e13a3 adding kube-controller-manager starting option tests 2017-09-07 10:54:02 +08:00
Kubernetes Submit Queue 3168bd4b12 Merge pull request #50708 from DirectXMan12/versions/autoscaling-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51956, 50708)

Move autoscaling/v2 from alpha1 to beta1

This graduates autoscaling/v2alpha1 to autoscaling/v2beta1.  The move is more-or-less just a straightforward rename.

Part of kubernetes/features#117

```release-note
v2 of the autoscaling API group, including improvements to the HorizontalPodAutoscaler, has moved from alpha1 to beta1.
```
2017-09-06 15:46:24 -07:00
Kubernetes Submit Queue 213c8c8753 Merge pull request #51956 from luxas/kubeadm_upgrade_bootstraptokens
Automatic merge from submit-queue (batch tested with PRs 51956, 50708)

kubeadm: Upgrade Bootstrap Tokens to beta when upgrading to v1.8

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

Makes sure the v1.7 -> v1.8 upgrade works regarding the Bootstrap Token alpha -> beta graduation.
Not much have to be done, but some LoC are needed to preserve the behaivor

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2017-09-06 15:46:19 -07:00
Lucas Käldström a455f995ac
kubeadm: Upgrade Bootstrap Tokens to beta when upgrading to v1.8 2017-09-06 21:04:33 +03:00
Kubernetes Submit Queue 0076f02df0 Merge pull request #51653 from DirectXMan12/versions/metrics-v2beta1
Automatic merge from submit-queue (batch tested with PRs 51603, 51653)

Graduate metrics/v1alpha1 to v1beta1

This introduces v1beta1 of the resource metrics API, previously in alpha.
The v1alpha1 version remains for compatibility with the Heapster legacy version
of the resource metrics API, which is compatible with the v1alpha1 version.  It also
renames the v1beta1 version to `resource-metrics.metrics.k8s.io`.

The HPA controller's REST clients (but not the legacy client) have been migrated as well.

Part of kubernetes/features#118.

```release-note
Migrate the metrics/v1alpha1 API to metrics/v1beta1.  The HorizontalPodAutoscaler
controller REST client now uses that version.  For v1beta1, the API is now known as
resource-metrics.metrics.k8s.io.
```
2017-09-06 02:55:12 -07:00
Josh Horwitz b286f9fdac Fixed CCM service controller start jitter 2017-09-06 09:23:02 +01:00
Kubernetes Submit Queue bd4aaf4d40 Merge pull request #51921 from liggitt/local-apiservice
Automatic merge from submit-queue

Improve APIService auto-registration for HA/upgrade scenarios

Fixes #51912

Required for 1.8 due to impact on HA upgrades.

/assign @deads2k

cc @kubernetes/sig-api-machinery-bugs

```release-note
Fixes an issue with APIService auto-registration affecting rolling HA apiserver restarts that add or remove API groups being served.
```
2017-09-05 20:38:21 -07:00
Kubernetes Submit Queue eb86cc5e87 Merge pull request #51634 from verb/sharedpid-default-off
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Revert to using isolated PID namespaces in Docker

**What this PR does / why we need it**: Reverts to the previous docker default of using isolated PID namespaces for containers in a pod. There exist container images that expect always to be PID 1 which we want to support unmodified in 1.8.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Sharing a PID namespace between containers in a pod is disabled by default in 1.8. To enable for a node, use the --docker-disable-shared-pid=false kubelet flag. Note that PID namespace sharing requires docker >= 1.13.1.
```
2017-09-05 18:40:33 -07:00
Solly Ross b0af402475 Move Autoscaling v2{alpha1 --> beta1}
This commit renames autoscaling/v2alpha1 to autoscaling/v2beta1.
Only the API-related code is moved in this commit.
2017-09-05 17:49:30 -04:00
Solly Ross 86f24eaf7a Update HPA REST metrics client to metrics/v1beta1
This commit updates the REST metrics client to use metrics/v1beta1.
The legacy client still uses metrics/v1alpha1.
2017-09-05 16:11:55 -04:00
Jordan Liggitt 8ca6d9994e
Sync local APIService objects once 2017-09-05 13:12:28 -04:00
Jordan Liggitt 0529dd405b
Prevent flutter of CRD APIServices on start 2017-09-05 13:12:27 -04:00
Jordan Liggitt 9a8b111c9c
Limit APIService healthz check to startup 2017-09-05 13:12:27 -04:00
Connor Doyle d0bcbbb437 Added static cpumanager policy. 2017-09-04 07:24:59 -07:00
Connor Doyle ec706216e6 Un-revert "CPU manager wiring and `none` policy"
This reverts commit 8d2832021a.
2017-09-04 07:24:59 -07:00
Hemant Kumar cd2a68473a Implement controller for resizing volumes 2017-09-04 09:02:34 +02:00
Hemant Kumar e78d433150 Implement necessary API changes
Introduce feature gate for expanding PVs
Add a field to SC
Add new Conditions and feature tag pvc update
Add tests for size update via feature gate
register the resize admission plugin
Update golint failures
2017-09-04 09:02:34 +02:00
Kubernetes Submit Queue 0dedd13ad7 Merge pull request #51734 from soltysh/cronjobs_beta
Automatic merge from submit-queue

Enable batch/v1beta1.CronJobs by default

This PR re-applies the cronjobs->beta back (https://github.com/kubernetes/kubernetes/pull/51720)  with the fix from @shyamjvs.

Fixes #51692

@apelisse @dchen1107 @smarterclayton ptal
@janetkuo @erictune fyi
2017-09-03 18:22:27 -07:00
Kubernetes Submit Queue e528a6e785 Merge pull request #51369 from luxas/kubeadm_poll_kubelet
Automatic merge from submit-queue (batch tested with PRs 51682, 51546, 51369, 50924, 51827)

kubeadm: Detect kubelet readiness and error out if the kubelet is unhealthy

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

In order to improve the UX when the kubelet is unhealthy or stopped, or whatever, kubeadm now polls the kubelet's API after 40 and 60 seconds, and then performs an exponential backoff for a total of 155 seconds.

If the kubelet endpoint is not returning `ok` by then, kubeadm gives up and exits.

This will miligate at least 60% of our "[apiclient] Created API client, waiting for control plane to come up" issues in the kubeadm issue tracker 🎉, as kubeadm now informs the user what's wrong and also doesn't deadlock like before.

Demo:
```
lucas@THEGOPHER:~/luxas/kubernetes$ sudo ./kubeadm init --skip-preflight-checks
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.4
[init] Using Authorization modes: [Node RBAC]
[preflight] Skipping pre-flight checks
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [thegopher kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.1.115]
[certificates] Generated apiserver-kubelet-client certificate and key.
[certificates] Generated sa key and public key.
[certificates] Generated front-proxy-ca certificate and key.
[certificates] Generated front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests"
[init] This often takes around a minute; or longer if the control plane images have to be pulled.
[apiclient] All control plane components are healthy after 40.502199 seconds
[markmaster] Will mark node thegopher as master by adding a label and a taint
[markmaster] Master thegopher tainted and labelled with key/value: node-role.kubernetes.io/master=""
[bootstraptoken] Using token: 5776d5.91e7ed14f9e274df
[bootstraptoken] Configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstraptoken] Configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstraptoken] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[uploadconfig] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[addons] Applied essential addon: kube-dns
[addons] Applied essential addon: kube-proxy

Your Kubernetes master has initialized successfully!

To start using your cluster, you need to run (as a regular user):

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  http://kubernetes.io/docs/admin/addons/

You can now join any number of machines by running the following on each node
as root:

  kubeadm join --token 5776d5.91e7ed14f9e274df 192.168.1.115:6443 --discovery-token-ca-cert-hash sha256:6f301ce8c3f5f6558090b2c3599d26d6fc94ffa3c3565ffac952f4f0c7a9b2a9

lucas@THEGOPHER:~/luxas/kubernetes$ sudo ./kubeadm reset
[preflight] Running pre-flight checks
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
[reset] Removing kubernetes-managed containers
[reset] Deleting contents of stateful directories: [/var/lib/kubelet /etc/cni/net.d /var/lib/dockershim /var/run/kubernetes /var/lib/etcd]
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
lucas@THEGOPHER:~/luxas/kubernetes$ sudo systemctl stop kubelet
lucas@THEGOPHER:~/luxas/kubernetes$ sudo ./kubeadm init --skip-preflight-checks
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.4
[init] Using Authorization modes: [Node RBAC]
[preflight] Skipping pre-flight checks
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [thegopher kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.1.115]
[certificates] Generated apiserver-kubelet-client certificate and key.
[certificates] Generated sa key and public key.
[certificates] Generated front-proxy-ca certificate and key.
[certificates] Generated front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests"
[init] This often takes around a minute; or longer if the control plane images have to be pulled.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz/syncloop' failed with error: Get http://localhost:10255/healthz/syncloop: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz/syncloop' failed with error: Get http://localhost:10255/healthz/syncloop: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz/syncloop' failed with error: Get http://localhost:10255/healthz/syncloop: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz/syncloop' failed with error: Get http://localhost:10255/healthz/syncloop: dial tcp 127.0.0.1:10255: getsockopt: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp 127.0.0.1:10255: getsockopt: connection refused.

Unfortunately, an error has occurred:
	timed out waiting for the condition

This error is likely caused by that:
	- The kubelet is not running
	- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
	- There is no internet connection; so the kubelet can't pull the following control plane images:
		- gcr.io/google_containers/kube-apiserver-amd64:v1.7.4
		- gcr.io/google_containers/kube-controller-manager-amd64:v1.7.4
		- gcr.io/google_containers/kube-scheduler-amd64:v1.7.4

You can troubleshoot this for example with the following commands if you're on a systemd-powered system:
	- 'systemctl status kubelet'
	- 'journalctl -xeu kubelet'
couldn't initialize a Kubernetes cluster
```

In this demo, I'm first starting kubeadm normally and everything works as usual.
In the second case, I'm explicitely stopping the kubelet so it doesn't run, and skipping preflight checks, so that kubeadm doesn't even try to exec `systemctl start kubelet` like it does usually.
That obviously results in a non-working system, but now kubeadm tells the user what's the problem instead of waiting forever.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Detect kubelet readiness and error out if the kubelet is unhealthy
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @pipejakob 

cc @justinsb @kris-nova @lukemarsden as well as you wanted this feature :)
2017-09-03 15:54:19 -07:00
Kubernetes Submit Queue 4d42f80382 Merge pull request #50925 from staebler/server-event-rate-limiter
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Limit events accepted by API Server

**What this PR does / why we need it**:
This PR adds the ability to limit events processed by an API server. Limits can be set globally on a server, per-namespace, per-user, and per-source+object. This is needed to prevent badly-configured or misbehaving players from making a cluster unstable.

Please see https://github.com/kubernetes/community/pull/945.

**Release Note:**
```release-note
Adds a new alpha EventRateLimit admission control that is used to limit the number of event queries that are accepted by the API Server.
```
2017-09-03 11:10:03 -07:00
Lucas Käldström 92c5997b8e
kubeadm: Detect kubelet readiness and error out if the kubelet is unhealthy 2017-09-03 18:02:46 +03:00
Lucas Käldström d3081ee23d
autogenerated code 2017-09-03 17:26:02 +03:00
Lucas Käldström b0a17d11e4
kubeadm: Add omitempty tags to nullable values and use metav1.Duration 2017-09-03 17:25:45 +03:00
Kubernetes Submit Queue 75e111ad87 Merge pull request #50864 from mbohlool/update_openapi_aggr
Automatic merge from submit-queue

Improvements to OpenAPI aggregation

Fixes #50863
Fixes #50011
Related: #50896
2017-09-03 06:54:50 -07:00
Lucas Käldström c575626988
autogenerated bazel 2017-09-03 12:29:03 +03:00
Lucas Käldström 94983530d4
Add unit tests for kubeadm upgrade 2017-09-03 12:26:10 +03:00
Lucas Käldström c237ff5bc0
Fully implement the kubeadm upgrade functionality 2017-09-03 12:25:47 +03:00
Maciej Szulik 6962427b35
Enable batch/v1beta1.CronJobs by default 2017-09-03 11:17:33 +02:00
mbohlool 76e24f216f Consolidate local OpenAPI specs and APIServices' spec into one data structure
Remove APIService OpenAPI spec when it is deleted

Add eTag support and returning httpStatus to OpenAPI spec downloader

Update aggregated OpenAPI spec periodically

Use delegate chain

Refactor OpenAPI aggregator to have separate controller and aggregation function

Enable OpenAPI spec for extensions api server

Do not filter paths. higher priority specs wins the conflicting paths

Move OpenAPI aggregation controller to pkg/controller/openapi
2017-09-03 02:16:08 -07:00
Kubernetes Submit Queue 2164f09bf9 Merge pull request #50832 from nckturner/external-ca
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

kubeadm: Add support for using an external CA whose key is never stored in the cluster

We allow a kubeadm user to use an external CA by checking to see if ca.key is missing and skipping cert checks and kubeconfig generation if ca.key is missing.  We also pass an empty arg --cluster-signing-key-file="" to kube controller manager so that the csr signer doesn't start. 



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

This PR allows the kubeadm certs phase and kubeconfig phase to be skipped if the ca.key is missing but all other certs are present.  

**Which issue this PR fixes** : 

Fixes kubernetes/kubeadm/issues/280

**Special notes for your reviewer**:

@luxas @mikedanese @fabriziopandini 

**Release note**:

```release-note
kubeadm: Add support for using an external CA whose key is never stored in the cluster
```
2017-09-02 19:26:20 -07:00
Kubernetes Submit Queue 23238d882b Merge pull request #51335 from luxas/kubeadm_cut_kubectl_dep
Automatic merge from submit-queue

kubeadm: Cut unnecessary kubectl dependency

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

Removes unnecessary dep

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cli-pr-reviews
2017-09-02 17:41:16 -07:00
Kubernetes Submit Queue 2dd659d3a7 Merge pull request #50840 from kad/swapcheck
Automatic merge from submit-queue

kubeadm: preflight check for enabled swap

**What this PR does / why we need it**:
Recent versions of kubelet require special flags if runned
on the system with enabled swap. Thus, remind user about either
disabling swap or add appropriate flag to kubelet settings

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-09-02 16:53:34 -07:00
Kubernetes Submit Queue 7941645e39 Merge pull request #50523 from rpothier/kubeadm-ipv6
Automatic merge from submit-queue

kubeadm: Add node-cidr-mask-size to pass to kube-controller-manager for IPv6

Due to the increased size of subnets with IPv6, the node-cidr-mask-size needs to be passed to kube-controller-manager. If IPv4 it will be set to 24 as it was previously, if IPv6, it will be set to 
64

**What this PR does / why we need it**:
If the user specifies the --pod-network-cidr with kubeadm init, this caused the kube-controller-manager manifest to include the "--allocate-node-cidrs" and "--cluster-cidr" flags to be set. The --node-cidr-mask-size is not set, and currently defaults to 24, which is fine for IPv4, but not appropriate for IPv6. This change passes the a value as the node-cidr-mask-size to the controller-manager. It detects if it is IPv4 or v6, and sets --node-cidr-mask-size to 24 for IPv4  as before, and to 64 for IPv6.


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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-09-02 16:06:17 -07:00
Kubernetes Submit Queue c84b3132a2 Merge pull request #48051 from xilabao/add-selfsubjectrulesreview-api
Automatic merge from submit-queue (batch tested with PRs 45724, 48051, 46444, 51056, 51605)

Add selfsubjectrulesreview in authorization

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

**Which issue this PR fixes**: fixes #47834 #31292

**Special notes for your reviewer**:

**Release note**:

```release-note
Add selfsubjectrulesreview API for allowing users to query which permissions they have in a given namespace.
```
/cc @deads2k @liggitt
2017-09-02 12:11:04 -07:00
Lee Verberne 145c343273 Revert to using isolated PID namespaces in Docker
A shared PID namespace were enabled by default in the 1.7 when running
with a supported Docker runtime, but a Docker version that supports
a shared namespace was not qualified for use.

Release 1.8 will qualify a docker version supporting shared PID, but we
don't want to cause disruption for container images which expect always
to have PID 1.
2017-09-01 23:50:11 +02:00
Jiaying Zhang 02001af752 Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
staebler a4542ae528 Create an EventRateLimit admission control plug-in for the API Server.
The EventRateLimit plug-in limits the number of events that the API Server
will accept in a given time period. It allows for server-wide, per-namespace,
per-user,and per-source+object rate limiting.
2017-09-01 13:38:03 -04:00
Shyam JVS 8d2832021a Revert "CPU manager wiring and `none` policy" 2017-09-01 18:17:36 +02:00
xilabao f14c138438 add selfsubjectrulesreview api 2017-09-01 19:09:43 +08:00
Kubernetes Submit Queue c65ab61b3f Merge pull request #51372 from mtaufen/feature-gate-file
Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

Separate feature gates for dynamic kubelet config vs loading from a file

This makes it so these two features can be turned on independently, rather than bundling both under dynamic kubelet config.

fixes: #51664

```release-note
NONE
```
2017-09-01 01:12:47 -07:00
Kubernetes Submit Queue 08ad0127ac Merge pull request #51357 from ConnorDoyle/cpu-manager-wiring-and-nonepolicy
Automatic merge from submit-queue (batch tested with PRs 49971, 51357, 51616, 51649, 51372)

CPU manager wiring and `none` policy

Blocker for CPU manager #49186 (4 of 6)

* Previous PR in this series: #51140
* Next PR in this series: #51180

cc @balajismaniam @derekwaynecarr @sjenning 

**Release note**:

```release-note
NONE
```

TODO:
- [X] In-memory CPU manager state
- [x] Kubelet config value
- [x] Feature gate
- [X] None policy
- [X] Unit tests
- [X] CPU manager instantiation
- [x] Calls into CPU manager from Kubelet container runtime
2017-09-01 01:12:39 -07:00