Commit Graph

57058 Commits (368afc6217b5f74e03bac84d9a2fa236dc4854e8)

Author SHA1 Message Date
Tim Allclair 368afc6217
Add GCP addon PodSecurityPolicies & Bindings 2017-11-01 14:03:05 -07:00
Kubernetes Submit Queue fcf9b1f7e5
Merge pull request #54893 from mengqiy/fix_convert
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 kubectl convert back to use legacyscheme and add tests

Revert the change of `convert.go` in #54533.
Add tests for kubectl convert.

Fixes #54873 

```release-note
NONE
```

cc: @smarterclayton
2017-11-01 13:11:12 -07:00
Kubernetes Submit Queue 444a161d22
Merge pull request #54708 from joelsmith/master
Automatic merge from submit-queue (batch tested with PRs 53962, 54708). 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>.

Prevent successful containers from restarting with OnFailure restart policy

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

This is a follow-on to #54597 which makes sure that its validation
also applies to pods with a restart policy of OnFailure. This
deficiency was pointed out by @smarterclayton here:
https://github.com/kubernetes/kubernetes/pull/54530#discussion_r147226458

**Which issue this PR fixes**  This is another fix to address #54499

**Release note**:
```release-note
NONE
```
2017-11-01 09:15:14 -07:00
Kubernetes Submit Queue f5b6dd8709
Merge pull request #53962 from Lion-Wei/kubeadm-ipvs
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>.

support kube-proxy ipvs mode for kubeadm

**What this PR does / why we need it**:
When using `kubeadm` to build a cluster, you can chose kube-proxy with ipvs mode by add flag `--kube-proxy-mode=ipvs`.

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

**Special notes for your reviewer**:
By default, use `iptables` mode. 
**Release note**:
```release-note
NONE
```
2017-11-01 09:04:56 -07:00
Kubernetes Submit Queue 96067e6d7b
Merge pull request #54543 from jamiehannaford/self-hosted-etcd-api
Automatic merge from submit-queue (batch tested with PRs 49840, 54937, 54543). 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 self-hosted etcd API to kubeadm

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

This PR is part of a larger set that implements self-hosted etcd. This PR takes a first step by adding:

1. new API types in `cmd/kubeadm/app/apis` for configuring self-hosted etcd 
2. new Go types in `cmd/kubeadm/app/phases/etcd/spec` used for constructing EtcdCluster CRDs for the etcd-operator. The reason we define these in trunk is because kubeadm cannot import `github.com/coreos/etcd-operator` as a dependency until it's in its own repo. Until then, we need to redefine the structs in our codebase.

**Which issue this PR fixes**:

https://github.com/kubernetes/kubeadm/issues/261
https://github.com/kubernetes/kubeadm/issues/277

**Special notes for your reviewer**:

This is the first step PR in order to save reviewers from a goliath PR

**Release note**:
```release-note
NONE
```
2017-11-01 08:20:28 -07:00
Kubernetes Submit Queue 746cc43f4b
Merge pull request #54937 from xiangpengzhao/remove-kubeadm-const
Automatic merge from submit-queue (batch tested with PRs 49840, 54937, 54543). 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 MinimumCSRAutoApprovalClusterRolesVersion in 1.9 cycle.

**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**:
Have we already bumped the minimum supported version to v1.8.0?
/cc @luxas 

**Release note**:

```release-note
NONE
```
2017-11-01 08:20:25 -07:00
Kubernetes Submit Queue c119a60946
Merge pull request #49840 from andrewrynhard/variable_certs_dir
Automatic merge from submit-queue (batch tested with PRs 49840, 54937, 54543). 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: Make it possible to configure volume mounts via the config file

**What this PR does / why we need it**:
Kubeadm mounts host CA certs into api server and controller manager. It uses `/etc/pki` and does not allow for the path to be configurable. This PR adds a default to `/etc/pki` but also allows a user to configure the path in the config file. In the case of using Container Linux, the CAs are located at `/usr/share/ca-certificates`, so without this PR the hardcoded `/etc/pki` path is used and will break, for example, the `--cloud-provider` flag because of missing CAs.

Fixes https://github.com/kubernetes/kubeadm/issues/484
Fixes https://github.com/kubernetes/kubeadm/issues/476
Fixes https://github.com/kubernetes/kubeadm/issues/441

/cc @luxas
2017-11-01 08:20:22 -07:00
Kubernetes Submit Queue 816f2f4605
Merge pull request #53048 from kubermatic/log-healthz-check-fail
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 error when a healthz check fails

**What this PR does / why we need it**:
Currently we only tell a user that a healthz check failed but we don't display the explicit error of the failed check. This is fine, but we should log the error to make debugging easier.

```release-note
Log error of failed healthz check
```
2017-11-01 07:27:09 -07:00
xiangpengzhao df81ecf396 Remove MinimumCSRAutoApprovalClusterRolesVersion in 1.9 cycle. 2017-11-01 20:51:32 +08:00
Kubernetes Submit Queue 618b705a4b
Merge pull request #53629 from andyzhangx/azurefile-improve
Automatic merge from submit-queue (batch tested with PRs 46341, 53629). 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 azure file mount limit issue on windows due to using drive letter

**What this PR does / why we need it**:
It's not necessary to use drive letter in azure file mount, correct usage for New-SmbGlobalMapping is like following:
```
New-SmbGlobalMapping -RemotePath $AzureFilePath -Credential $Credential
mklink /D $mountPath $AzureFilePath 
```
I removed the `LocalPath` parameter in New-SmbGlobalMapping

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54668
Without this PR, there is a limit(25) for azure file mount number on each node because only 25 drive letters could be used on each windows node, With this PR, there would be no such limit.

**Special notes for your reviewer**:
@PatrickLang 

**Release note**:

```
fix azure file mount limit issue on windows due to using drive letter
```
/sig azure
/sig windows
2017-11-01 04:38:12 -07:00
Kubernetes Submit Queue e2c3137900
Merge pull request #46341 from zhangxiaoyu-zidif/add-unittest-for-secret
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 unittest for describe secret

**What this PR does / why we need it**:
add unittest for describe secret


**Release note**:

```release-note
NONE
```
2017-11-01 04:33:15 -07:00
Kubernetes Submit Queue 741beb6453
Merge pull request #54888 from Cynerva/gkk/fix-iptables-conflict
Automatic merge from submit-queue (batch tested with PRs 54822, 53561, 54888). 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 hook failure in kubernetes-worker charm due to iptables conflict

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

This fixes a hook failure that can occur on the kubernetes-worker charm due to iptable conflicts:

```
Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
...
subprocess.CalledProcessError: Command '['iptables', '-P', 'FORWARD', 'ACCEPT']' returned non-zero exit status 4
```

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

Passing `-w 300` to iptables tells it to wait up to 5 minutes to acquire the xtables lock, rather than aborting immediately.

**Release note**:

```release-note
NONE
```
2017-11-01 03:44:24 -07:00
Kubernetes Submit Queue e93b049be0
Merge pull request #53561 from justinsb/update_aws_sdk_go_1_12_7
Automatic merge from submit-queue (batch tested with PRs 54822, 53561, 54888). 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 AWS SDK to 1.12.7

```release-note
Update AWS SDK to 1.12.7
```

This includes support for all the latest goodies - in particular NLB and tagging as part of CreateVolume

cc @micahhausler  @gnufied 

Issue #54032
2017-11-01 03:44:22 -07:00
Jamie Hannaford c19d146f87 Add generated files 2017-11-01 11:40:52 +01:00
Jamie Hannaford 5eae39d688 Add selfHosted etcd API 2017-11-01 11:40:44 +01:00
Kubernetes Submit Queue 52e41805b0
Merge pull request #54822 from janetkuo/ds-appsv1-validate
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>.

Validate apps/v1 DaemonSet selector immutable on updates

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-01 03:00:23 -07:00
Mengqi Yu b518a80cef add test for convert 2017-11-01 01:14:24 -07:00
Mengqi Yu 44aa7116e4 switch convert to use pkg/api/legacyscheme 2017-11-01 00:20:50 -07:00
Kubernetes Submit Queue 7f9f847ce9
Merge pull request #54406 from superbrothers/kubectl-override-short-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>.

Improve 'kubectl completion` to override short flags

**What this PR does / why we need it**: This PR improves `kubectl completion` to override short flags in
addition to long flags. I tested this PR in both bash and zsh.

```
# Complete pods name in the `default` namespace
$ kubectl get po nginx-4217019353-<tab>
nginx-4217019353-mw1pk  nginx-4217019353-rzw2c

# Complete pods name in the `kube-system` namepace due to overriding the namespace
$ kubectl -n kube-system get po kube<tab>
kube-addon-manager-minikube  kube-dns-910330662-l9pwt     kubernetes-dashboard-9fbhm
```

**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-10-31 22:32:54 -07:00
Andrew Rynhard 5a64c049e6
Allow extra volumes to be defined 2017-10-31 21:44:45 -07:00
Kubernetes Submit Queue 705de0a93f
Merge pull request #52513 from yanxuean/streamExec
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>.

improve the relation of ExecInContainer and Exec

keep the relation between ExecInContainer and Exec be consistence with PortForward in streaming server

fix #54903
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>

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

**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
```
2017-10-31 21:44:19 -07:00
Kubernetes Submit Queue 7fdacaa6bf
Merge pull request #54801 from apelisse/fix-broken-truncate
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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 `truncateBody` to not truncate with high level

And add a unit-tests to verify that it works properly.

**What this PR does / why we need it**:
Update `truncateBody` so that one can use `V(10)` to read the entire content of a HTTP response.

**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-10-31 20:10:27 -07:00
Kubernetes Submit Queue f65e55146e
Merge pull request #52607 from zhangxiaoyu-zidif/optimize-intergration-test-rs
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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>.

optimize speed of integration test:rc

**What this PR does / why we need it**:
optimize the speed of integration test for rc

**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**:
```shell
make test-integration WHAT=./test/integration/replicaset GOFLAGS="-v" KUBE_TEST_ARGS="-run ^TestUpdateSelectorToRemoveControllerRef$"

**Before modification:**

Replicates test:
--- PASS: TestUpdateSelectorToRemoveControllerRef (32.70s)
	replicaset_test.go:377: patched rs = &v1beta1.ReplicaSet{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"rs", GenerateName:"", Namespace:"rs-update-selector-to-remove-controllerref", SelfLink:"/apis/extensions/v1beta1/namespaces/rs-update-selector-to-remove-controllerref/replicasets/rs", UID:"12cb97ec-9b59-11e7-a829-186590dec5c5", ResourceVersion:"100", Generation:2, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63641216052, loc:(*time.Location)(0x91f6800)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1beta1.ReplicaSetSpec{Replicas:(*int32)(0xc4227a7ad4), MinReadySeconds:0, Selector:(*v1.LabelSelector)(0xc42035dfe0), Template:v1.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test", "uniqueKey":"1"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1.PodSpec{Volumes:[]v1.Volume(nil), InitContainers:[]v1.Container(nil), Containers:[]v1.Container{v1.Container{Name:"fake-name", Image:"fakeimage", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]v1.ContainerPort(nil), EnvFrom:[]v1.EnvFromSource(nil), Env:[]v1.EnvVar(nil), Resources:v1.ResourceRequirements{Limits:v1.ResourceList(nil), Requests:v1.ResourceList(nil)}, VolumeMounts:[]v1.VolumeMount(nil), LivenessProbe:(*v1.Probe)(nil), ReadinessProbe:(*v1.Probe)(nil), Lifecycle:(*v1.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"Always", SecurityContext:(*v1.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"Always", TerminationGracePeriodSeconds:(*int64)(0xc4227a7b90), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", DeprecatedServiceAccount:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", HostNetwork:false, HostPID:false, HostIPC:false, SecurityContext:(*v1.PodSecurityContext)(0xc422fa6380), ImagePullSecrets:[]v1.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*v1.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]v1.Toleration(nil), HostAliases:[]v1.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil)}}}, Status:v1beta1.ReplicaSetStatus{Replicas:2, FullyLabeledReplicas:2, ReadyReplicas:0, AvailableReplicas:0, ObservedGeneration:1, Conditions:[]v1beta1.ReplicaSetCondition(nil)}}
PASS
ok  	k8s.io/kubernetes/test/integration/replicaset	**32.810s**
+++ [0917 11:34:42] Cleaning up etcd
+++ [0917 11:34:42] Integration test cleanup complete


**After modification:**
--- PASS: TestUpdateSelectorToRemoveControllerRef (3.10s)
	replicaset_test.go:377: patched rs = &v1beta1.ReplicaSet{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"rs", GenerateName:"", Namespace:"rs-update-selector-to-remove-controllerref", SelfLink:"/apis/extensions/v1beta1/namespaces/rs-update-selector-to-remove-controllerref/replicasets/rs", UID:"5b2fa66f-9b5b-11e7-bf1a-186590dec5c5", ResourceVersion:"100", Generation:2, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63641217033, loc:(*time.Location)(0x91f6800)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1beta1.ReplicaSetSpec{Replicas:(*int32)(0xc4225dd374), MinReadySeconds:0, Selector:(*v1.LabelSelector)(0xc422f08e40), Template:v1.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"name":"test", "uniqueKey":"1"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:v1.PodSpec{Volumes:[]v1.Volume(nil), InitContainers:[]v1.Container(nil), Containers:[]v1.Container{v1.Container{Name:"fake-name", Image:"fakeimage", Command:[]string(nil), Args:[]string(nil), WorkingDir:"", Ports:[]v1.ContainerPort(nil), EnvFrom:[]v1.EnvFromSource(nil), Env:[]v1.EnvVar(nil), Resources:v1.ResourceRequirements{Limits:v1.ResourceList(nil), Requests:v1.ResourceList(nil)}, VolumeMounts:[]v1.VolumeMount(nil), LivenessProbe:(*v1.Probe)(nil), ReadinessProbe:(*v1.Probe)(nil), Lifecycle:(*v1.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"Always", SecurityContext:(*v1.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"Always", TerminationGracePeriodSeconds:(*int64)(0xc4225dd3f0), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string(nil), ServiceAccountName:"", DeprecatedServiceAccount:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", HostNetwork:false, HostPID:false, HostIPC:false, SecurityContext:(*v1.PodSecurityContext)(0xc423096ac0), ImagePullSecrets:[]v1.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*v1.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]v1.Toleration(nil), HostAliases:[]v1.HostAlias(nil), PriorityClassName:"", Priority:(*int32)(nil)}}}, Status:v1beta1.ReplicaSetStatus{Replicas:2, FullyLabeledReplicas:2, ReadyReplicas:0, AvailableReplicas:0, ObservedGeneration:1, Conditions:[]v1beta1.ReplicaSetCondition(nil)}}
PASS
ok  	k8s.io/kubernetes/test/integration/replicaset	**3.216s**
+++ [0917 11:50:33] Cleaning up etcd
+++ [0917 11:50:33] Integration test cleanup complete
```

**Release note**:

```release-note
NONE
```
2017-10-31 20:10:24 -07:00
Kubernetes Submit Queue ed00d9c062
Merge pull request #54445 from crimsonfaith91/rem
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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 created-by annotation

**What this PR does / why we need it**:
This PR removes `CreatedByAnnotation`.

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

**Release note**:

```release-note
The `kubernetes.io/created-by` annotation is no longer added to controller-created objects. Use the  `metadata.ownerReferences` item that has `controller` set to `true` to determine which controller, if any, owns an object.
```
2017-10-31 20:10:21 -07:00
Kubernetes Submit Queue 3bea3e873a
Merge pull request #54790 from wackxu/fixTODOPdb
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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>.

one of min-available/max-available must be specified when create pdb

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

fix TODO one of min-available/max-available must be specified when create pdb

**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-10-31 20:10:18 -07:00
Kubernetes Submit Queue ff5f00537d
Merge pull request #53190 from lichen2013/issues_34457
Automatic merge from submit-queue (batch tested with PRs 53190, 54790, 54445, 52607, 54801). 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>.

Improve kubectl error messages

Fixes #34457
Part of work on #31267
2017-10-31 20:10:16 -07:00
Kubernetes Submit Queue 09d896bfd0
Merge pull request #54202 from shiywang/force_apply
Automatic merge from submit-queue (batch tested with PRs 54446, 54202). 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 apply --force --overwrite deployment lables e2e test enhance

some tests e2e cases enhance, releated to previous bug https://github.com/openshift/origin/issues/15017 here. and fixed here https://github.com/kubernetes/kubernetes/pull/48481

/sig-cli
```release-note
NONE
```
2017-10-31 15:51:25 -07:00
Kubernetes Submit Queue 037b8ab8b3
Merge pull request #54446 from smarterclayton/cleanup_get
Automatic merge from submit-queue (batch tested with PRs 54446, 54202). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create a new package for generic commands like get

This is in preparation for cleaning up the structure of `kubectl get` to ease implementing serverside get and streaming API responses. Moves a hardcoded constant into a method in preparation for a future serverside implementation. Also improves some existing description text.
2017-10-31 15:51:23 -07:00
George Kraft 47f44f58a5 Fix hook failure in kubernetes-worker charm due to iptables conflict 2017-10-31 17:05:53 -05:00
Kubernetes Submit Queue 7efc6c83f0
Merge pull request #54046 from hzxuzhonghu/kubectl-apply
Automatic merge from submit-queue (batch tested with PRs 54326, 54046). 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>.

kubectl apply does not send empty patch request

**What this PR does / why we need it**:
`kubectl apply -f filename` always send patch request to apiserver, whether the file changed or not.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-31 14:13:20 -07:00
Kubernetes Submit Queue 725fc6228e
Merge pull request #54326 from crimsonfaith91/dover
Automatic merge from submit-queue (batch tested with PRs 54326, 54046). 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>.

convert testOverlappingDeployment e2e test to integration test

**What this PR does / why we need it**:
This PR convert a deployment e2e test named "testOverlappingDeployment" to integration test.

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

**Release note**:

```release-note
NONE
```
2017-10-31 14:13:17 -07:00
Kubernetes Submit Queue ef9d21703e
Merge pull request #54827 from dashpole/cadvisor_godep
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). 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 cadvisor godeps to v0.27.2

This fixes an issue with overlay2 support for Docker and CRI-O, which was introduced in 1.8.

We should cherrypick this to the 1.8 branch.

cc @kubernetes/sig-node-pr-reviews 
@derekwaynecarr @dchen1107 

```release-note
Fix overlay2 container disk metrics for Docker and CRI-O
```
2017-10-31 13:22:23 -07:00
Kubernetes Submit Queue 3c6ff87fa5
Merge pull request #52192 from liyinan926/ds-tests
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). 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>.

Initial integration test setup for DaemonSet controller

**What this PR does / why we need it**:
This PR setup and added some initial integration tests for the DaemonSet controller. All tests included were ported from their unit test counterparts that currently use fake client, informers, reactor, etc. Future PRs will port more tests over once this PR is approved and merged.

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

**Special notes for your reviewer**:
@kow3ns 

**Release note**:
```release-note
NONE
```
2017-10-31 13:22:20 -07:00
Kubernetes Submit Queue a7a0a63f16
Merge pull request #54820 from sjevs/test/issue-54645-kubectl-apply-view-last-applied
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). 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>.

Added a test for proper `%s` handling when display last applied confi…

**What this PR does / why we need it**:
Added missing tests which checks proper handling of `%s` in arguments for command `kubectl apply view-last-applied`

**Which issue this PR fixes**
#54645

**Special notes for your reviewer**:
Added a test case to cover specific issue described. 
It fails on version `v1.7.3`..`v1.7.9` and passes since `v1.8.0`. 

P.S. Not sure if there is already a lower level test which covers this case in the k8s test suite. I would recommend to add this test, so the issue would not reoccur.

**Release note**:
```release-note
NONE
```
2017-10-31 13:22:18 -07:00
Kubernetes Submit Queue 53582702fc
Merge pull request #54774 from m1093782566/ipv6-bug
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). 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 IPV6 judgement bug and add UTs

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

Fix IPV6 judgement bug and add UTs.

**Which issue this PR fixes** : closes #54775

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
/area ipv6
/kind bug
2017-10-31 13:22:15 -07:00
Jun Xiang Tee 131f7e1469 convert testOverlappingDeployment e2e test to integration test 2017-10-31 11:39:27 -07:00
Kubernetes Submit Queue a80985a283
Merge pull request #54617 from YuxiJin-tobeyjin/printpodwide
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 unit test for get pod -o wide

**What this PR does / why we need it**:
Add unit test for get pod -o wide;
In func printPod, one can choose to use "options.Wide", so unit test is needed accordingly.

**Release note**:

```release-note
```
NONE
2017-10-31 11:32:12 -07:00
Yinan Li 4dc42d078b Initial integration test setup for DaemonSet controller 2017-10-31 10:53:30 -07:00
Antoine Pelisse a63ecc4a92 Update `truncateBody` to not truncate with high level
And add a unit-tests to verify that it works properly.
2017-10-31 09:40:31 -07:00
Shiyang Wang e6405dccf6 add apply --force --overwrite deployment lables e2e test enhance 2017-11-01 00:21:14 +08:00
Kubernetes Submit Queue 35e9784196
Merge pull request #53034 from tallclair/gce-addons
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 GCE-specific addons directory

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

GCE & GKE currently rely on the cluster bringup defined in the `cluster/gce` directory, but there isn't a good way of deploying GCE specific manifests. Currently the 2 approaches are, put it in `/cluster/addons`, which implies it should be generally useful (not GCE specific), or it is synthesized by one of the bash scripts in `cluster/gce`.

This PR introduces a straightforward way to have GCE-specific manifests deployed for GCE & GKE, without the need to pollute the general addon space.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-10-31 09:12:55 -07:00
Kubernetes Submit Queue c2a18cca6b
Merge pull request #54796 from Cynerva/gkk/fix-docker-1.13
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 iptables FORWARD policy for Docker 1.13 in kubernetes-worker charm

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

This fixes the kubernetes-worker charm to work with Docker >= 1.13 by calling `iptables -P FORWARD ACCEPT`.

**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
Fix iptables FORWARD policy for Docker 1.13 in kubernetes-worker charm
```
2017-10-31 03:52:36 -07:00
Kubernetes Submit Queue ee3a08a772
Merge pull request #54001 from cblecker/sed-func
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 gnu-sed detection into a function

**What this PR does / why we need it**:
Moves gnu-sed detection into a reusable function across scripts (considering it's in multiple places).

**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-10-31 03:09:46 -07:00
Kubernetes Submit Queue eb658d699a
Merge pull request #54016 from praseodym/kubeadm-upgrade-plan-offline
Automatic merge from submit-queue (batch tested with PRs 54160, 54016). 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 upgrade plan` for offline operation

**What this PR does / why we need it**:
This PR allows `kubeadm upgrade plan` to work in firewalled/offline/otherwise restricted environments by ignoring errors when trying to reach dl.k8s.io. Instead, we fall back to the current kubeadm version as the latest stable version. This is a reasonable as a user is [expected to install a recent version of kubeadm before upgrading](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm-upgrade-1-8/#upgrading-your-control-plane).

**Which issue this PR fixes**: Fixes kubernetes/kubeadm#498

**Special notes for your reviewer**: Should preferably be cherrypicked to 1.8.

```release-note
Fix `kubeadm upgrade plan` for offline operation: ignore errors when trying to fetch latest versions from dl.k8s.io
```
2017-10-31 01:23:18 -07:00
Kubernetes Submit Queue 94935721d5
Merge pull request #54160 from mtaufen/runtime-config-to-flags
Automatic merge from submit-queue (batch tested with PRs 54160, 54016). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move runtime-related flags from KubeletConfiguration to KubeletFlags

With respect to https://github.com/kubernetes/kubernetes/pull/53833#issuecomment-336317287, move runtime-related flags out of KubeletConfiguration.

Broader issue: https://github.com/kubernetes/features/issues/281

```release-note
NONE
```
2017-10-31 01:23:15 -07:00
wackxu dbbe9ba8bc add test for pdb 2017-10-31 15:32:02 +08:00
Kubernetes Submit Queue d118e44320
Merge pull request #54686 from m1093782566/gce-alpha-fail
Automatic merge from submit-queue (batch tested with PRs 54572, 54686). 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 service session affinity e2e failure cases

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

Fix service session affinity e2e failure cases - debuging...

**Which issue this PR fixes**:

xref #54571 #54524

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig network
2017-10-30 21:45:17 -07:00
Kubernetes Submit Queue f46f0efd31
Merge pull request #54572 from ellenkorbes/ellenmakesamess
Automatic merge from submit-queue (batch tested with PRs 54572, 54686). 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>.

kubectl partial env docs & examples

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

It adds documentation and examples to kubectl env.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: This PR partially addresses [#98](https://github.com/kubernetes/kubectl/issues/98).

**Special notes for your reviewer**:

This is a partial PR. I'm mostly looking for feedback as to whether I'm on the right track with this issue. Any feedback is appreciated. Thanks.

(This is my contribution to Outreachy's Kubernetes internship application.)

**Release note**:


```release-note
NONE
```
2017-10-30 21:45:14 -07:00
Clayton Coleman 93fed120fb
Move printing the valid resource types to a function
Should be calculated from discovery in the future. Also improve
descriptions on the affected commands.
2017-10-30 23:45:45 -04:00
Kubernetes Submit Queue 127dc0653f
Merge pull request #54818 from apelisse/propagate-error-diff
Automatic merge from submit-queue (batch tested with PRs 54728, 54818). 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>.

diff: Propragate errors when diffing

Because of that, errors while diffing would potentially not do anything,
leaving the user clueless of what was going on.

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

**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-10-30 20:29:18 -07:00