Commit Graph

69642 Commits (ce2dfac29619818bd06afbf2893a84aa501fba0b)

Author SHA1 Message Date
Michelle Au ce2dfac296 generated files 2018-09-04 16:47:43 -07:00
Michelle Au 8091c7975b Integration and e2e tests 2018-09-04 16:30:14 -07:00
Michelle Au 01d83fa104 Scheduler changes to assume volume and pod together, and then bind
volume and pod asynchronously afterwards. This will also make it easier
to migrate to the scheduler framework.
2018-09-04 16:30:14 -07:00
Michelle Au 37d46a1e3f Volume scheduling library changes:
* FindPodVolumes
    * Prebound PVCs are treated like unbound immediate PVCs and will error
    * Always check for fully bound PVCs and cache bindings for not fully
      bound PVCs
* BindPodVolumes
    * Retry API updates for not fully bound PVCs even if the assume cache
      already marked it
    * Wait for PVCs to be fully bound after making the API updates
    * Error when detecting binding/provisioning failure conditions
2018-09-04 16:30:14 -07:00
Kubernetes Submit Queue be11540775
Merge pull request #68138 from wongma7/nfs-e2e-containerd
Automatic merge from submit-queue (batch tested with PRs 67736, 68123, 68138). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Update external provisioner test to use latest nfs-provisioner

**What this PR does / why we need it**: latest nfs-provisioner will work with cri-containerd, so let's update 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**: I want to move this test to use nfs-client-provisioner soon anyway since a lot of our e2e tests already use a containerized nfs server and it would be good to be consistent. So this can be treated as something of a stopgap but it would be nice to have ASAP to unblock https://github.com/kubernetes-incubator/external-storage/issues/432#issuecomment-417511065

**Release note**:

```release-note
NONE
```
2018-09-04 12:51:38 -07:00
Kubernetes Submit Queue d8365a9ca7
Merge pull request #68123 from mgdevstack/master-securitycontext-67032
Automatic merge from submit-queue (batch tested with PRs 67736, 68123, 68138). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Port security context NodeConformance e2e_node tests to e2e

**What this PR does / why we need it**:
Port all [NodeConformance] SecurityContext e2e_node tests to e2e/common.

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

**Special notes for your reviewer**:
- This PR is a continuing effort to close #67032.
- Removed ContainerRuntime constraint [as discussed](https://github.com/kubernetes/kubernetes/pull/67032#discussion_r214201870).
- Porting all [NodeConformance] tests to e2e/common which do not have node dependencies.
- Does it make sense to port [privileged test](https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/security_context_test.go#L558) to e2e/common and remove [NodeFeature:HostAccess] label from test name? 

**Release note**:

```release-note
NONE
```
/area conformance
@kubernetes/sig-node-pr-reviews
2018-09-04 12:51:35 -07:00
Kubernetes Submit Queue 4b4e1bec69
Merge pull request #67736 from cheftako/GetClusters
Automatic merge from submit-queue (batch tested with PRs 67736, 68123, 68138). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Added support to get clusters in gce cloud provider.

**What this PR does / why we need it**:
Implemented the call to get all cluster objects in a zone for a project.
Also added code to allow the container api to be set in the gce.conf
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 #

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-09-04 12:51:32 -07:00
Kubernetes Submit Queue 6b02edd369
Merge pull request #68196 from losipiuk/lo/revert-delte-predicate-funs
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add back predicate related accessors to scheduler.Configurator

```release-note
NONE
```
2018-09-04 11:41:37 -07:00
Kubernetes Submit Queue a0b457d0e5
Merge pull request #67555 from wgliang/opt/improve-performance
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Not split nodes when searching for nodes but doing it all at once

**What this PR does / why we need it**:
Not split nodes when searching for nodes but doing it all at once.

**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**:
@bsalamat 

This is a follow up PR of #66733.

https://github.com/kubernetes/kubernetes/pull/66733#discussion_r205932531

**Release note**:

```release-note
Not split nodes when searching for nodes but doing it all at once.
```
2018-09-04 11:41:34 -07:00
Kubernetes Submit Queue 92ad24cc4d
Merge pull request #68132 from soltysh/deprecate_run
Automatic merge from submit-queue (batch tested with PRs 63011, 68089, 67944, 68132). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Start deprecating all generators in run except for run-pod/v1

**What this PR does / why we need it**:
This was discussed during SIG-CLI meetings over several past months. The direction is that we want to move away from `kubectl run` because it's over bloated and complicated for both users and developers. We want to mimic `docker run` with `kubectl run` so that it *only* creates a pod, and if you're interested in other resources `kubectl create` is the intended replacement. 

This PR starts with deprecating all of the generator except for the pod one.

/assign @juanvallejo 
/sig cli
/milestone v1.12

**Release note**:
```release-note
Deprecate kubectl run generators, except for run-pod/v1
```
2018-09-04 10:24:47 -07:00
Kubernetes Submit Queue 5540edc1f9
Merge pull request #67944 from fabriziopandini/kubeadm-config-configMap
Automatic merge from submit-queue (batch tested with PRs 63011, 68089, 67944, 68132). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Kubeadm upload and fetch of kubeam config v1alpha3

**What this PR does / why we need it**:
This PR implements upload and fetch of kubeam config v1alpha3 from cluster.

More in detail:
In upload, `kubeadm-config` gets
- `ClusterConfiguration` (without components config which are already stored in separated ConfigMaps)
- `ClusterStatus`(initialised or updated with the API endpoint of the current node)

During fetch `InitConfiguration` is composed with:
- `ClusterConfiguration` from `kubeadm-config`
- The `APIEndpoint` of the current node from `ClusterStatus` in `kubeadm-config`
- Component configs from corresponding ConfigMaps

**Which issue(s) this PR fixes** :
refs https://github.com/kubernetes/kubeadm/issues/911, refs https://github.com/kubernetes/kubeadm/issues/963

**Special notes for your reviewer**:
In order to implement this it was necessary to extend current component config management with a new GetFromConfigMap operation. This is implemented in a separated commit "
implement component configs GetFromConfigMap".
The real change build on this (commi "upload and fetch kubeadm v1alpha3")

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

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/sig cluster-lifecycle
/area kubeadm
/kind enhancement
/assign @luxas
/assign @timothysc
/cc @chuckha @rosti @neolit123 @liztio
2018-09-04 10:24:43 -07:00
Kubernetes Submit Queue 47434899b8
Merge pull request #68089 from DirectXMan12/feature/hpa-heapster-deprecation
Automatic merge from submit-queue (batch tested with PRs 63011, 68089, 67944, 68132). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Mark HPA REST Clients Flag as Deprecated

This marks the option to switch to Heapster for the HPA as deprecated.
It'll be removed next release when Heapster is retired.

**Release note**:

```release-note
Using the Horizontal Pod Autoscaler with metrics from Heapster is now deprecated.
```
2018-09-04 10:24:40 -07:00
Kubernetes Submit Queue 9c86087dba
Merge pull request #63011 from NickrenREN/local-plugin-change
Automatic merge from submit-queue (batch tested with PRs 63011, 68089, 67944, 68132). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Support both directory and block device for local volume plugin FileSystem VolumeMode

Support both directory and block device for local volume plugin FileSystem VolumeMode 

xref: [local storage dynamic provisioning design #1914](https://github.com/kubernetes/community/pull/1914)

**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
Support both directory and block device for local volume plugin FileSystem VolumeMode 
```
2018-09-04 10:24:36 -07:00
Kubernetes Submit Queue 1fc36a5743
Merge pull request #67469 from stewart-yu/stewart-controller-manager-kubecomponentconfig
Automatic merge from submit-queue (batch tested with PRs 65074, 67469). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Move kube-controller-manager ComponentConfig external types to `k8s.io/kube-controller-manager`

**What this PR does / why we need it**:
As the title describe:
split `kube-controller-manager` component api into their own packages:
      
- external component api located in `k8s.io/kube-controller-manager/config/v1alpha/types.go`;
- internal component api located in `pkg/controller/apis/config/types.go`


**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 #
ref: [kubernetes/community#2354](https://github.com/kubernetes/community/pull/2354)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-09-04 08:03:40 -07:00
Kubernetes Submit Queue 789c361eb7
Merge pull request #65074 from wgliang/master.describe-pv
Automatic merge from submit-queue (batch tested with PRs 65074, 67469). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add CSI volume attributes for kubectl describe pv

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

kubectl describe pv doesn't show the volume attributes.

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

**Special notes for your reviewer**:
/cc @saad-ali 

**Release note**:

```release-note
Add CSI volume attributes for kubectl describe pv.
```
2018-09-04 08:03:35 -07:00
stewart-yu 3fd3e40803 add OWNERS file 2018-09-04 19:40:13 +08:00
stewart-yu cef2ab756c [kube-controller-manager] auto-generated file 2018-09-04 19:40:10 +08:00
stewart-yu 3f50614ff7 [kube-controller-manager] auto-generated file about run godeps 2018-09-04 19:40:07 +08:00
stewart-yu 5fbfed4d43 [kube-controller-manager] fix violation and golint failure 2018-09-04 19:40:03 +08:00
stewart-yu 6a90b7f780 [kube-controller-manager] fix some reference from cmd/*-controller-manager about kubeControllerManagerConfiguration 2018-09-04 19:40:00 +08:00
stewart-yu a226928dc9 [kube-controller-manager] fix some reference from pkg/apis/componentconfig about kube-controller-manager api 2018-09-04 19:39:41 +08:00
stewart-yu 1c6c45563f [kube-controller-manager] create package to hold kube-controller-manager component api 2018-09-04 19:39:35 +08:00
stewart-yu be4a437e71 [kube-controller-manager] just only remove struct and default about KubeControllerManagerConfiguration from pkg/apis/componentconfig 2018-09-04 19:38:48 +08:00
Kubernetes Submit Queue 674401ace1
Merge pull request #67817 from tnozicka/fix-rollout-status-wait
Automatic merge from submit-queue (batch tested with PRs 67986, 68210, 67817). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix waiting in kubectl rollout status

**What this PR does / why we need it**:
By `kubectl rollout status` being based on `UntilWithoutRetry` it will fail whenever the watcher is closed - cased by the closing the underlying connection - e.g. on API timeout, LB timeout, ... 

Using UntilWithSync (based on informer) allows it to recover from all the failures and truly work trough unlimited timeouts.

(Split from https://github.com/kubernetes/kubernetes/pull/50102)

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

**Special notes for your reviewer**:

**Release note**:
```release-note
`kubectl rollout status` now works for unlimited timeouts.
```
2018-09-04 04:19:36 -07:00
Kubernetes Submit Queue 217a7f4059
Merge pull request #68210 from feiskyer/az-panic
Automatic merge from submit-queue (batch tested with PRs 67986, 68210, 67817). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix panic when processing http response

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

When Azure ARM API gets something wrong, kube-controller-manager may panic because of azure cloud provider:

```
/usr/local/go/src/runtime/asm_amd64.s:2361
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1d4cad9]

goroutine 1386 [running]:
k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
panic(0x44468c0, 0x8b76a30)
	/usr/local/go/src/runtime/panic.go:502 +0x229
k8s.io/kubernetes/pkg/cloudprovider/providers/azure.processHTTPRetryResponse(0x0, 0x64ffec0, 0xc4229fd1f0, 0xc422ed05b0, 0x2, 0x2)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/azure_backoff.go:364 +0x69
k8s.io/kubernetes/pkg/cloudprovider/providers/azure.(*Cloud).CreateOrUpdatePIPWithRetry.func1(0xc422ed0600, 0x0, 0x0)
	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/cloudprovider/providers/azure/azure_backoff.go:205 +0x298
```

This PR fixes that.

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

**Special notes for your reviewer**:

Should cherry pick to old releases.

**Release note**:

```release-note
Fix panic when processing Azure HTTP response.
```
2018-09-04 04:19:33 -07:00
Kubernetes Submit Queue 771bb86fa1
Merge pull request #67986 from andyzhangx/azure-lb-mixed-proto
Automatic merge from submit-queue (batch tested with PRs 67986, 68210, 67817). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

add mixed protocol support for azure load balancer

**What this PR does / why we need it**:
If user specify `service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: "true"`, azure cloud provider will create both TCP and UDP lb rules, for more details, could refer to https://github.com/kubernetes/kubernetes/issues/66887

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

**Special notes for your reviewer**:
original `reconcileLoadBalancer` func is too big, I move part of code implementation to a standalone func `createLoadBalancerRule`

example service config:
```
apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: "true"
  name: web
  namespace: default
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: web
  sessionAffinity: None
  type: LoadBalancer
```

**Release note**:

```
add mixed protocol support for azure load balancer
```

/kind feature
/sig azure
/assign @feiskyer @khenidak
2018-09-04 04:19:30 -07:00
Maciej Szulik 2c4917db86
Start deprecating all generators in run except for run-pod/v1 2018-09-04 11:24:20 +02:00
fabriziopandini d9b4b1fc1a autogenerated 2018-09-04 09:10:26 +02:00
fabriziopandini 8af751fe90 use new kubeadm-config in kubeadm join control-plane & kubeadm upgrade/upgrade node 2018-09-04 09:10:14 +02:00
fabriziopandini 3f70af3685 upload and fetch of kubeam config v1alpha3 from cluster 2018-09-04 09:09:55 +02:00
Pengfei Ni 071eb9f6bf Fix panic when processing http response 2018-09-04 14:26:19 +08:00
Guoliang Wang 6c63dcfffe Not split nodes when searching for nodes but doing it all at once 2018-09-04 14:07:24 +08:00
Kubernetes Submit Queue 5b355f5d40
Merge pull request #68122 from krzysztof-jastrzebski/scale_down
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Replace scale down window

**What this PR does / why we need it**:
Replace scale down forbidden window with scale down stabilization window.

This allows scale down based on more than one sample, to avoid rapidly changing size up and down for controllers with fluctuating load.

A bit more in https://docs.google.com/document/d/1IdG3sqgCEaRV3urPLA29IDudCufD89RYCohfBPNeWIM

This PR is copy of #67771 with resolved comments.

**Release note**:
```release-note
Replace scale down forbidden window with scale down stabilization window. Rather than waiting a fixed period of time between scale downs HPA now scales down to the highest recommendation it during the scale down stabilization window.
```
2018-09-03 21:39:02 -07:00
Kubernetes Submit Queue e5b30e05fe
Merge pull request #68188 from esevan/fix_bug_openstack_lb
Automatic merge from submit-queue (batch tested with PRs 68135, 68188). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fixup openstack cloud provider loadbalancer deletion error

This change enables ```getLoadBalancer``` to return the loadbalancer even if no floating ip is associated to the VIP port of the loadbalancer.

Signed-off-by: Eunsoo Park <esevan.park@gmail.com>



**What this PR does / why we need it**:
This PR fixes the bug like below.
```
Warning  CreatingLoadBalancerFailed  17m (x3445 over 12d)  service-controller  Error creating load balancer (will retry): error getting LB for service default/influxdb: error getting floating ip for port 81253cae-acd6-4bed-8006-814c8729be8c: failed to find object
```
**Special notes for your reviewer**:
Refer to following bug description for better understanding of this PR.
When k8s service type is changed from LoadBalancer to others, there's a deleting loadbalancer process in kubernetes cloud provider as below.

https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/service/service_controller.go#L284 
```
if !wantsLoadBalancer(service) {
	_, exists, err := s.balancer.GetLoadBalancer(context.TODO(), s.clusterName, service)
	if err != nil {
		return fmt.Errorf("error getting LB for service %s: %v", key, err)
	}
	if exists {
		glog.Infof("Deleting existing load balancer for service %s that no longer needs a loadbalancer.", key)
		s.eventRecorder.Event(service, v1.EventTypeNormal, "DeletingLoadBalancer", "Deleting loadbalancer")
		if err := s.balancer.EnsureLoadBalancerDeleted(context.TODO(), s.clusterName, service); err != nil {
			return err
		}
		s.eventRecorder.Event(service, v1.EventTypeNormal, "DeletedLoadBalancer", "Deleted loadbalancer")
	}
```

Openstack cloud provider returns error even though LB exists since there's no associated floating IP with VIP port. 
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go#L476

```
floatIP, err := getFloatingIPByPortID(lbaas.network, portID)
if err != nil {
	return nil, false, fmt.Errorf("error getting floating ip for port %s: %v", portID, err)
}
```

This caused ```GetLoadBalancer()``` failed and retrying over and over in ```processServiceUpdate``` of ```k8sServiceController```.


**Release note**:

```release-note
NONE
```
2018-09-03 18:46:29 -07:00
Kubernetes Submit Queue 06ffb07e8e
Merge pull request #68135 from shyamjvs/add-random-backoff-to-cidr-allocator
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Use random backoff for retries in cloud-cidr-allocator

Ref https://github.com/kubernetes/kubernetes/pull/68084#issuecomment-417651247
/cc @wojtek-t 

```release-note
NONE
```
2018-09-03 18:41:40 -07:00
Kubernetes Submit Queue f3b98a08b0
Merge pull request #66799 from noqcks/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add validation for kube-scheduler configuration options

**What this PR does / why we need it**: This adds validation to the kube-scheduler so that we're not accepting bogus values to the kube-scheduler. As requested by @bsalamat in issue https://github.com/kubernetes/kubernetes/issues/66743

**Which issue(s) this PR fixes**:
Fixes #66743

**Special notes for your reviewer**:
- Not sure if this validation is too heavy handed. Would love some feedback. 
- I started working on this before I realized @islinwb was also working on this same problem... https://github.com/kubernetes/kubernetes/pull/66787 I put this PR up anyways since I'm sure good code exists in both. I wasn't aware of the /assign command so didn't assign myself before starting work. 
- I didn't have time to work on adding validation to deprecated cli options. If the rest of this looks ok, I can finish that up.
- I hope the location of IsValidSocketAddr is correct. Lmk if it isn't. 

**Release note**:
```release-note
Adding validation to kube-scheduler at the API level
```
2018-09-03 17:17:49 -07:00
Kubernetes Submit Queue 7548764f96
Merge pull request #67788 from mohamed-mehany/inter-pod-affinity-optimization
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Affinity/Anti-Affinity Optimization of Pod Being Scheduled

**What this PR does / why we need it**:
Following #66948, it was noticed that the applied optimizations for anti-affinity rules lookup of existing pods could be further applied to checking affinity and anti-affinity terms of the Pod being scheduled. This is done by mapping topology pairs to pods that potentially match the pod being scheduled instead of mapping nodes to matching pods, and accordingly the search space is reduced.

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

**Special notes for your reviewer**:
/sig scheduling
/sig scalability

**Release note**:

```release-note
Improve performance of Pod affinity/anti-affinity in the scheduler
```
2018-09-03 11:40:09 -07:00
Łukasz Osipiuk fa39053412 Add back predicate related accessors to scheduler.Configurator 2018-09-03 19:12:01 +02:00
Kubernetes Submit Queue ed958b7d79
Merge pull request #68019 from damemi/hpa-v2beta2-conversion-fix
Automatic merge from submit-queue (batch tested with PRs 67397, 68019). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix conversion for autoscaling/v1 ObjectMetricSource and add fuzzer

**What this PR does / why we need it**:
Selectors in ObjectMetricSource's weren't being persisted through roundtrip conversions, and this wasn't caught because we had no fuzzer testing MetricIdentifier selectors

**Which issue(s) this PR fixes**:
none

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-09-03 08:23:31 -07:00
Kubernetes Submit Queue d47a513681
Merge pull request #67397 from neolit123/bind-address
Automatic merge from submit-queue (batch tested with PRs 67397, 68019). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

kubeadm: fix offline and air-gapped support

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

1.

Change the error output of getAllDefaultRoutes() so that it includes
information on which files were probed for the IP routing tables
even if such files are obvious.

Introduce a new error type which can be used to figure out of this
error is exactly of the "no routes" type.

2.

If netutil.ChooseBindAddress() fails looking up IP route tables
it will fail with an error in which case the kubeadm config
code will hard stop.

This scenario is possible if the Linux user intentionally disables
the WiFi from the distribution settings. In such a case the distro
could empty files such files as /proc/net/route and ChooseBindAddress()
will return an error.

For improved offline support, don't error on such scenarios but instead
show a warning. This is done by using the NoRoutesError type.
Also default the address to 0.0.0.0.

While doing that, prevent some commands like `init`, `join` and also
phases like `controlplane` and `certs` from using such an invalid
address.

3.

If there is no internet, label versions fail and this breaks
air-gapped setups unless the users pass an explicit version.

To work around that:
- Remain using 'release/stable-x.xx' as the default version.
- On timeout or any error different from status 404 return error
- On status 404 fallback to using the version of the client via
kubeadmVersion()

Add unit tests for kubeadmVersion().

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

**Special notes for your reviewer**:
1st and second commits fix offline support.
3rd commit fixes air-gabbed support (as discussed in the linked issue)

the api-machinery change is only fmt.Errorf() related.

**Release note**:

```release-note
kubeadm: fix air-gapped support and also allow some kubeadm commands to work without an available networking interface
```

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews 
/cc @kubernetes/sig-api-machinery-pr-reviews 
/assign @kad
/assign @xiangpengzhao 
/area UX
/area kubeadm
/kind bug
2018-09-03 08:23:28 -07:00
Tomas Nozicka def9c9eb42 Update Bazel 2018-09-03 15:34:50 +02:00
Tomas Nozicka 7793211669 Switch kubectl rollout status to UntilWithSync to avoid premature
timeouts
2018-09-03 15:34:20 +02:00
Tomas Nozicka f2a6fd394a Generalize kubectl rollout StatusViewer interface 2018-09-03 15:34:20 +02:00
Kubernetes Submit Queue 5e9a3adafc
Merge pull request #68021 from krzysztof-jastrzebski/hpa5
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Increase Horizontal Pod Autoscaler update frequency to every 15s

**What this PR does / why we need it**:
PR increases Horizontal Pod Autoscaler default update interval (30s -> 15s). It will improve HPA reaction time for metric changes.

**Release note**:
```release-note
Increase Horizontal Pod Autoscaler default update interval (30s -> 15s). It will improve HPA reaction time for metric changes.
```
2018-09-03 06:23:40 -07:00
Kubernetes Submit Queue 1cfeede6d5
Merge pull request #68143 from shyamjvs/garbage-collect-kubemark-image
Automatic merge from submit-queue (batch tested with PRs 68127, 68143). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

GC kubemark image after cluster starts up

Last piece to fix https://github.com/kubernetes/kubernetes/issues/59567

/cc @wojtek-t 

```release-note
NONE
```
2018-09-03 04:45:32 -07:00
Kubernetes Submit Queue 6701e24c83
Merge pull request #68127 from serathius/metrics-server-30s
Automatic merge from submit-queue (batch tested with PRs 68127, 68143). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Increase metrics-server scrape frequency to 30s

With new release of metrics-server and it's performance improvement, we will reduce metrics pipeline latency from 60s to 30s. 
This is part of sig-autoscaling effort to improve HPA https://github.com/kubernetes/kubernetes/pull/68021
```release-note
Increase scrape frequency of metrics-server to 30s
```
/cc @kawych @mwielgus @DirectXMan12 @dashpole
2018-09-03 04:45:29 -07:00
Marek Siarkowicz abe3554db8 Increase metrics-server scrape frequency to 30s 2018-09-03 10:06:17 +02:00
Eunsoo Park da5618e66b Fixup openstack cloud provider loadbalancer deletion error
This change enables ```getLoadBalancer``` to return the loadbalancer even if no floating ip is associated to the VIP port of the loadbalancer.

Signed-off-by: Eunsoo Park <esevan.park@gmail.com>
2018-09-03 16:25:11 +09:00
Solly Ross ec428d2f9d Mark HPA REST Clients Flag as Deprecated
This marks the option to switch to Heapster for the HPA as deprecated.
It'll be removed next release when Heapster is retired.
2018-09-03 01:42:57 -04:00
NickrenREN 5bc823f141 fix and update local volume e2es 2018-09-03 13:35:23 +08:00