Commit Graph

19004 Commits (ec271f5c09fdc8fe01529a6033f1ca280b1f5eb6)

Author SHA1 Message Date
Kubernetes Submit Queue 32d79c3461 Merge pull request #39443 from freehan/cri-hostport
Automatic merge from submit-queue (batch tested with PRs 40111, 40368, 40342, 40274, 39443)

refactor hostport logic

Refactor hostport logic to avoid using api.Pod object directly.
2017-01-31 19:18:44 -08:00
Kubernetes Submit Queue 8fe7a2decb Merge pull request #40342 from louyihua/remove_warning
Automatic merge from submit-queue (batch tested with PRs 40111, 40368, 40342, 40274, 39443)

Eliminate "Unknown service type: ExternalName"

When creating an ExternalName service, rest.go still generate the warning message "Unknown service type: ExternalName". This should be eliminated as this type of service is supported now.
2017-01-31 19:18:41 -08:00
Kubernetes Submit Queue c09311fa32 Merge pull request #40111 from juanvallejo/jvallejo/add-ensure-print-headers
Automatic merge from submit-queue

Add printer#EnsurePrintHeaders method

This patch adds a new `EnsurePrintHeaders` method to the
HumanReadablePrinter `ResourcePrinter`, which allows headers to be
printed in cases where multiple lists of the same resource are printed
consecutively, but are separated by non-printer related information.

Related downstream PR: https://github.com/openshift/origin/pull/12528

**Release note**:
```release-note
release-note-none
```

cc @fabianofranz @AdoHe
2017-01-31 18:53:27 -08:00
deads2k a106d9f848 switch kubelet to use external (client-go) object references for events 2017-01-31 19:15:33 -05:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k 1ef5d26079 move pkg/storage to apiserver 2017-01-31 19:07:33 -05:00
Kubernetes Submit Queue 36809e2c2e Merge pull request #39366 from zdj6373/manager-log
Automatic merge from submit-queue (batch tested with PRs 40527, 40738, 39366, 40609, 40748)

Log rectification

Log error, modify
2017-01-31 15:49:43 -08:00
Kubernetes Submit Queue adbb975389 Merge pull request #40738 from deads2k/client-18-portforward
Automatic merge from submit-queue (batch tested with PRs 40527, 40738, 39366, 40609, 40748)

move portforward to client-go

Second to last one.  I had to split some tests like we did for apimachinery, but they still run in kubernetes.

@sttts
2017-01-31 15:49:42 -08:00
Kubernetes Submit Queue 31df7e411c Merge pull request #40527 from php-coder/docker_manager_cleanup
Automatic merge from submit-queue (batch tested with PRs 40527, 40738, 39366, 40609, 40748)

pkg/kubelet/dockertools/docker_manager.go: removing unused stuff

This PR removes unused constants and variables. I checked that neither kubernetes nor openshift code aren't using them.
2017-01-31 15:49:37 -08:00
Derek Carr 6d73112d5b Reduce log noise when aws cloud cannot find public-ip4 metadata 2017-01-31 17:28:49 -05:00
Jordan Liggitt cf74abd892
fixup apply null tests 2017-01-31 15:00:23 -05:00
Anastasis Andronidis 4bdcc03c0b
test for explicit null value propagation in apply 2017-01-31 14:22:24 -05:00
deads2k 700c30f3c7 move portforward to client-go 2017-01-31 14:13:35 -05:00
Kubernetes Submit Queue 86d561424d Merge pull request #40740 from liggitt/client-gen-comments
Automatic merge from submit-queue (batch tested with PRs 38772, 38797, 40732, 40740)

Prevent spurious diff in all generated clients when adding new group/version

Including custom arguments in the generated file comment means adding any new group/version results in a diff of all generated clients in all groups/versions

@ncdc PTAL
2017-01-31 11:00:56 -08:00
Kubernetes Submit Queue 1cd06fbcf0 Merge pull request #38797 from aaron12134/spell-obsession
Automatic merge from submit-queue (batch tested with PRs 38772, 38797, 40732, 40740)

Synchronous spellcheck for pkg/volume/*

**What this PR does / why we need it**: Increase code readability

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

**Release note**:

```release-note
```
2017-01-31 11:00:47 -08:00
deads2k 384c873914 remove unneeded storage options 2017-01-31 13:44:39 -05:00
Jordan Liggitt aa4a3e1613
Regenerate clients 2017-01-31 11:16:27 -05:00
Kevin b410f3f4c2 address review comments 3 2017-01-31 21:39:17 +08:00
Kevin 3c550c32fb address review comments 2 2017-01-31 21:39:17 +08:00
Kevin 6a2ef1646b address review comments 2017-01-31 21:39:17 +08:00
Kevin 36dcb57407 forgiveness library changes 2017-01-31 21:39:17 +08:00
Kubernetes Submit Queue 16164c6a54 Merge pull request #40711 from spxtr/owner
Automatic merge from submit-queue

Remove spxtr from several owners files, add rmmh as test reviewer.

**Release note**:
```release-note
NONE
```
2017-01-31 05:03:53 -08:00
Kubernetes Submit Queue 3e81148c55 Merge pull request #40083 from soltysh/remove_extjobs
Automatic merge from submit-queue (batch tested with PRs 40405, 38601, 40083, 40730)

Remove extensions/v1beta1.Jobs leftover

It looks like I missed this one file when removing `extensions/v1beta1.Jobs` last time (#38614).

@caesarxuchao ptal, since you were reviewing last time
@kubernetes/sig-api-machinery-misc fyi
2017-01-31 04:44:43 -08:00
Kubernetes Submit Queue 90a382864e Merge pull request #40405 from vwfs/azure_lb_readonly_fix
Automatic merge from submit-queue

Set NetworkInterfaces and Subnets to nil before updating Azure security groups

**What this PR does / why we need it**: This is a workaround until we have an upstream fix in azure-sdk-for-go/go-autorest. Corresponding issues are https://github.com/kubernetes/kubernetes/issues/40332 and https://github.com/Azure/go-autorest/issues/112

In k8s 1.5.2, an update to azure-sdk-for-go was cherry-picked, which broke creation/updating of LBs on Azure. As we should have it back to a working state ASAP, I'd like to do a workaround for now and later when the upstream fix comes in, remove the workaround again.

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

**Release note**:

```release-note
Fix failing load balancers in Azure
```

CC @colemickens
2017-01-31 04:19:05 -08:00
Kubernetes Submit Queue fe01eef0bb Merge pull request #39242 from NickrenREN/kuberuntime-manager
Automatic merge from submit-queue (batch tested with PRs 40392, 39242, 40579, 40628, 40713)

optimize podSandboxChanged() function and fix some function notes
2017-01-31 01:16:51 -08:00
Kubernetes Submit Queue ac29a05908 Merge pull request #40392 from madhusudancs/federation-kubefed-rbac
Automatic merge from submit-queue (batch tested with PRs 40392, 39242, 40579, 40628, 40713)

[Federation][kubefed] Create a dedicated service account for federation controller manager in the host cluster and give it appropriate permissions.

Ref: Issue #39555

cc @kubernetes/sig-federation-pr-reviews @kubernetes/sig-auth-misc @kubernetes/sig-auth-pr-reviews 

```release-note
kubefed init creates a service account for federation controller manager in the federation-system namespace and binds that service account to the federation-system:federation-controller-manager role that has read and list access on secrets in the federation-system namespace. 
```
2017-01-31 01:16:48 -08:00
Kubernetes Submit Queue 0c15857a1d Merge pull request #40145 from nebril/iptables-util-unit-tests
Automatic merge from submit-queue (batch tested with PRs 38443, 40145, 40701, 40682)

pkg/util/iptables missing unit tests
2017-01-30 20:59:42 -08:00
Kubernetes Submit Queue 564016bd9f Merge pull request #38443 from NickrenREN/vol-mgr-getVolumeInUse
Automatic merge from submit-queue (batch tested with PRs 38443, 40145, 40701, 40682)

fix GetVolumeInUse() function

Since we just want to get volume name info, each volume name just need to added once.  desiredStateOfWorld.GetVolumesToMount() will return volume and pod binding info,
if one volume is mounted to several pods, the volume name will be return several times. That is not what we want in this function.
We can add a new function to only get the volume name info  or judge whether the volume name is added to the desiredVolumesMap array.
2017-01-30 20:59:38 -08:00
mbohlool 32e1ef9a87 Update Bazel 2017-01-30 20:05:21 -08:00
mbohlool 2c9475c2cb Update generated OpenAPI specs 2017-01-30 20:05:20 -08:00
mbohlool 300b28354c Add backward compatibility to OpenAPI spec for renamed definitions 2017-01-30 20:05:19 -08:00
mbohlool 239169a5a4 Use full package path as definition name in OpenAPI 2017-01-30 20:05:18 -08:00
Kubernetes Submit Queue 553438e90a Merge pull request #40700 from liggitt/lister-gen-cleanup
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

Clean up generated comment for lister/informers

The generated comment including the command line means the addition of a new group/version touches all listers/informers, not just the ones for the new group/version

@ncdc PTAL
2017-01-30 19:14:44 -08:00
Kubernetes Submit Queue fe992b7902 Merge pull request #40683 from wojtek-t/protobufs_by_default
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

Enable protobufs as storage format by default

**Release note**:

```release-note
Change default storage format to protobufs. With this PR apiserver will be writing objects serialized as protobufs to etcd. If the apiserver was upgraded in the existing clusters, until an object will be written, it will still be stored as JSON. Apiserver can deal with some data being in json and some in protobuf format as of 1.4 release.
```

@kubernetes/sig-api-machinery-misc @kubernetes/sig-api-machinery-pr-reviews
2017-01-30 19:14:42 -08:00
Kubernetes Submit Queue 25de8ef641 Merge pull request #40551 from juanvallejo/jvallejo/only-output-no-resources-found-for-human-readable-printer
Automatic merge from submit-queue (batch tested with PRs 40691, 40551, 40683, 40700, 40702)

only output "No resources found." for human readable printers

**Release note**:
```release-note
release note none
```

This patch removes the message `No resources found` (currently printed through stderr) when printing through a generic / non-human-readable printer (json, yaml, jsonpath, custom-columns).

**Before***
```
$ kubectl get pods -o json
No resources found.
{
    "apiVersion": "v1",
    "items": [],
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
}
```

**After**
```
$ kubectl get pods -o json
{
    "apiVersion": "v1",
    "items": [],
    "kind": "List",
    "metadata": {},
    "resourceVersion": "",
    "selfLink": ""
}
```

cc @fabianofranz @stevekuznetsov
2017-01-30 19:14:41 -08:00
Janet Kuo d76683be22 Fix formatting issue of secret volume describer 2017-01-30 18:40:12 -08:00
Kubernetes Submit Queue 9574ef54ec Merge pull request #40618 from janetkuo/patch-resource-name
Automatic merge from submit-queue (batch tested with PRs 40703, 40093, 40618, 40659, 39810)

Print resource name when patch is done

Before:
```console
$ kubectl patch deployment nginx -p '{"spec":{"progressDeadlineSeconds":200}}'
"nginx" patched
```

After:
```console
$ kubectl patch deployment nginx -p '{"spec":{"progressDeadlineSeconds":200}}'
deployment "nginx" patched
```
2017-01-30 17:14:54 -08:00
Minhan Xia 548a6122c5 rename HostportHandler to HostportSyncer 2017-01-30 16:30:06 -08:00
Madhusudan.C.S 05a0f64903 Address review comments. 2017-01-30 14:31:15 -08:00
Joe Finney 3ec286adda Remove spxtr from several owners files, add rmmh as test reviewer. 2017-01-30 13:45:21 -08:00
Jordan Liggitt c4e52d3df2
Regenerate listers/informers 2017-01-30 15:46:36 -05:00
Wojciech Tyczynski dae29625da Enable protobufs in etcd by default 2017-01-30 20:14:06 +01:00
deads2k c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Kubernetes Submit Queue 1b9f89691a Merge pull request #34533 from yuexiao-wang/fix-commends
Automatic merge from submit-queue

Update function name for public function in commend

**What this PR does / why we need it**:
Update function name for public function in commend and fix some typos in log information.

Signed-off-by: yuexiao-wang wang.yuexiao@zte.com.cn
2017-01-30 09:05:22 -08:00
deads2k 8a61368a60 add details to patch conflict 2017-01-30 11:21:42 -05:00
Kubernetes Submit Queue 3dbbd0bdf4 Merge pull request #40606 from deads2k/client-17-sync
Automatic merge from submit-queue (batch tested with PRs 34543, 40606)

sync client-go and move util/workqueue

The vision of client-go is that it provides enough utilities to build a reasonable controller.  It has been copying `util/workqueue`.  This makes it authoritative.

@liggitt I'm getting really close to making client-go authoritative ptal.

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-30 08:19:10 -08:00
Kubernetes Submit Queue 914402281b Merge pull request #40673 from kargakis/unit-test-fix
Automatic merge from submit-queue

controller: don't run informers in unit tests when unnecessary

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

@mfojtik it seems that using informers makes the deployment sync for the initial relist so this races with the enqueue that these tests are testing.
2017-01-30 06:44:54 -08:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Kubernetes Submit Queue 2cb17cc677 Merge pull request #40426 from sttts/sttts-more-cutoffs-3
Automatic merge from submit-queue

genericapiserver: cut off more dependencies – episode 3

Compare commit subjects.

This is the first step to get `apiserver_test.go` and `watch_test.go` in `pkg/genericapiserver/endpoints` cutoff from k8s.io/kubernetes dependencies.

After this we have to sync client-go and then "episode 4" can go in.

approved based on #40363
2017-01-30 05:57:49 -08:00
Kubernetes Submit Queue 6e92d41a83 Merge pull request #40663 from sttts/sttts-readd-generic-features
Automatic merge from submit-queue

pkg/genericapiserver: re-add generic feature gates

https://github.com/kubernetes/kubernetes/pull/40543 removed the kubernetes feature gates (which subsume the generic ones) from genericapiserver. This PR readds the generic ones again.

This is not strictly necessary for kube-apiserver. But some other downstream project without its own feature gates needs this.
2017-01-30 05:11:48 -08:00
Michail Kargakis 5ccc6d2727 controller: don't run informers in unit tests when unnecessary 2017-01-30 11:36:49 +01:00
Brendan Burns 45ade78eb3 Add initial french translations as an example. 2017-01-29 22:56:48 -08:00
Kubernetes Submit Queue 5b88f0e1de Merge pull request #40538 from vmware/fixvSphereDeleteVolume
Automatic merge from submit-queue

Adding vmdk file extension for vmDiskPath in vsphere DeleteVolume

**What this PR does / why we need it**:
This fix is required to handle situation when volume path is not set with vmdk file extension.
DiskAttach call does not require vmdk file extension to be explicitly set in the file path, so in PV yaml file, users have option to set such file path.

Issue happens when such PV is created with persistentVolumeReclaimPolicy set to Delete, and user deletes associated PVC. Volume deletion will fail with the message: file was not found 


**Which issue this PR fixes** *
Fixes: #40560

**Special notes for your reviewer**:
Tested fix with custom image: divyen/hyperkube-fix-deletevolume:latest (Image built using base v1.5.3-beta.0)
@kerneltime @BaluDontu  please review this fix.
2017-01-29 22:32:34 -08:00
Kubernetes Submit Queue f1cd8508e5 Merge pull request #40596 from liggitt/auth-owners
Automatic merge from submit-queue

Update authn/authz owners and reviewers

Add myself as potential reviewer to several authn/authz-related packages.

Add @deads2k as approver to several packages he wrote.
2017-01-29 20:57:05 -08:00
Kubernetes Submit Queue dd34f325bd Merge pull request #40598 from liggitt/serviceaccount-owners
Automatic merge from submit-queue

Add OWNERS file for pkg/serviceaccount
2017-01-29 20:56:53 -08:00
Kubernetes Submit Queue 9de944b58e Merge pull request #40506 from brendandburns/i18n6
Automatic merge from submit-queue

Extract strings for the 'kubectl set' family of commands.
2017-01-29 20:56:44 -08:00
Kubernetes Submit Queue 66bea1f86c Merge pull request #40532 from MHBauer/log-typo
Automatic merge from submit-queue

fix typo in logging statement

**What this PR does / why we need it**:
Typo fix in logs. I am writing an apiserver for service-catalog, and this annoys me when I see it in my logs.

**Special notes for your reviewer**:
Doc/text change only. No functional change. Feel free to combine with some existing PR.

**Release note**:

```release-note
NONE
```
2017-01-29 18:36:30 -08:00
Brendan Burns eecfcfb376 Extract strings for the 'kubectl set' family of commands. 2017-01-29 14:46:07 -08:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 88d9829ad5 pkg/kubelet/rkt: adapt to new appc/spec 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski 6b6b6c747e pkg/api/testing: split fuzzer between apimachinery and kube 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski a12c661773 pkg/util: move trace.go to k8s.io/apiserver/pkg/util/trace 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski b500b744ce pkg/genericapiserver: re-add generic feature gates 2017-01-29 19:31:43 +01:00
Kubernetes Submit Queue a3f8ee6578 Merge pull request #39135 from xingzhou/kube-39110
Automatic merge from submit-queue

Improve error messages for ValidateObject method.

Improved error messages for #ValidateObject method
in pkg/api/validation/schema.go.

Fixed #39110
2017-01-29 06:02:35 -08:00
Kubernetes Submit Queue 4bba610565 Merge pull request #40605 from deads2k/generic-32-movehttpstream
Automatic merge from submit-queue

pkg/util: move httpstream to k8s.io/apimachinery

pick one commit from @sttts's pull https://github.com/kubernetes/kubernetes/pull/40426

This blocks some client-go splitting, so I'm picking it out and merging it separately.  It's not my commit, so its not a self-lgtm in that sense.

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-29 05:15:22 -08:00
Kubernetes Submit Queue 93bd7005e6 Merge pull request #40348 from brendandburns/i18n4
Automatic merge from submit-queue

Extract strings for the config family of commands.

@fabianofranz @kubernetes/sig-cli-pr-reviews
2017-01-29 04:23:28 -08:00
Fabiano Franz 5eeef81edf Fix sorting printer with missing fields 2017-01-28 19:56:53 -02:00
Kubernetes Submit Queue 38540f17bb Merge pull request #40585 from cblecker/kube-proxy-mode-annotation-remove
Automatic merge from submit-queue

Remove proxy-mode annotation from kube-proxy

**What this PR does / why we need it**:
This removes the net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Remove outdated net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.
```
2017-01-28 11:53:53 -08:00
Christoph Blecker a9dfd254c7
Remove proxy-mode annotation from kube-proxy
This removes the net.experimental.kubernetes.io/proxy-mode and net.beta.kubernetes.io/proxy-mode annotations from kube-proxy.
2017-01-28 09:12:28 -08:00
Kubernetes Submit Queue 597e938e3a Merge pull request #40621 from timothysc/daemonset_dos
Automatic merge from submit-queue

Decrease Daemonset burst replicas due to DoS conditions.

**What this PR does / why we need it**:
We are seeing DoS conditions on our Registry if were running a large cluster with too many daemonsets bursting at once.  

**Special notes for your reviewer**:
I decided not to plumb through yet another variable to the command line.  Ideally such parameters could be tweaked via a configuration file.  

**Release note**:

```release-note
NONE
```
2017-01-28 06:46:36 -08:00
Kubernetes Submit Queue e7950e6f49 Merge pull request #39977 from justinsb/aws_fix_infof
Automatic merge from submit-queue

AWS: Fix a few log messages Info -> Infof

Get those `%q`-s out of my logs :-)

```release-note
NONE
```
2017-01-27 21:03:27 -08:00
Brendan Burns 25ba561702 Extract strings for translation for the kubectl config family. 2017-01-27 20:31:49 -08:00
Kubernetes Submit Queue 63fed78005 Merge pull request #40601 from liggitt/bindata
Automatic merge from submit-queue (batch tested with PRs 40132, 39302, 40194, 40619, 40601)

Update translation bindata

Make on master leaves these changes in bindata.go
2017-01-27 18:32:27 -08:00
Kubernetes Submit Queue a951727a18 Merge pull request #40597 from wojtek-t/cleanup_get_from_cache
Automatic merge from submit-queue (batch tested with PRs 40497, 39769, 40554, 40569, 40597)

Minor cleanup in getting from apiserver cache in kubelet
2017-01-27 17:38:28 -08:00
Kubernetes Submit Queue c776d0978b Merge pull request #39769 from danwinship/networkpolicy-validation
Automatic merge from submit-queue (batch tested with PRs 40497, 39769, 40554, 40569, 40597)

NetworkPolicy validation improvements

I noticed while implementing NetworkPolicy that I we weren't validating the "Ports" field at all.

The docs are actually completely silent about what a string-valued Port field is supposed to mean. I had guessed it meant to call `net.LookupPort()` on it (ie, map it from /etc/services) but in every other case where we have an IntOrString-valued Port field in an API struct, it refers to a named ContainerPort. But that would be extremely awkward to implement in this case; a policy specifying a named port could end up mapping to a different numeric port on every container in the namespace... Do other people actually implement string-valued ports that way? Or, for that matter, implement string-valued ports at all? (Related: I hadn't noticed until now that you can leave the Port value unspecified, allowing you to say "allow to all UDP ports, but no TCP ports" or "allow to all TCP ports, but no UDP ports". That seems like something that ended up in the spec just because it was possible, not because it was actually useful...)

@kubernetes/sig-network-misc
2017-01-27 17:38:25 -08:00
Yu-Ju Hong c436671cca kuberuntime: remove the kubernetesManagedLabel label
The CRI shim should be responsible for returning only those
containers/sandboxes created through CRI. Remove this label in kubelet.
2017-01-27 17:08:46 -08:00
Janet Kuo a155111acd Print resource name when patch is done 2017-01-27 14:58:52 -08:00
Kubernetes Submit Queue 62c802203b Merge pull request #40330 from janetkuo/kill-failed-daemon-pods
Automatic merge from submit-queue

DaemonSet controller actively kills failed pods (to recreate them)

Ref #36482, @erictune @yujuhong @mikedanese @kargakis @lukaszo @piosz @kubernetes/sig-apps-bugs 

This also helps with DaemonSet update

```release-note
```
2017-01-27 13:47:09 -08:00
Kubernetes Submit Queue 6ec312a9d3 Merge pull request #40548 from deads2k/generic-31-storage-api
Automatic merge from submit-queue (batch tested with PRs 40600, 40548)

remove storage dependency on api

@sttts fyi
2017-01-27 12:57:17 -08:00
Kubernetes Submit Queue e24a326757 Merge pull request #40600 from liggitt/cascading-delete-test
Automatic merge from submit-queue (batch tested with PRs 40600, 40548)

Test cascading delete without client-side reaper does not GET
2017-01-27 12:57:15 -08:00
Yu-Ju Hong 4506f4c2d0 securitycontext: move docker-specific logic into kubelet/dockertools
This change moves the code specific to docker to kubelet/dockertools,
while leaving the common utility functions at its current package
(pkg/securitycontext).

When we deprecate dockertools in the future, the code will be moved to
pkg/kubelet/dockershim instead.
2017-01-27 12:25:46 -08:00
Dr. Stefan Schimanski 674d78b2ab pkg/util: move httpstream to k8s.io/apimachinery 2017-01-27 15:10:42 -05:00
Timothy St. Clair 52bedaf416 Decrease Daemonset burst replicas due to DoS conditions. 2017-01-27 13:34:11 -06:00
deads2k 9fb37f3bba remove storage dependency on api 2017-01-27 14:02:28 -05:00
Kubernetes Submit Queue 760a51f03a Merge pull request #39469 from kevin-wangzefeng/forgiveness-API-changes
Automatic merge from submit-queue (batch tested with PRs 39469, 40557)

Forgiveness api changes

**What this PR does / why we need it**:
Splited from #34825 , contains api changes that are needed to implement forgiveness:
1. update toleration api types to support forgiveness, added a new field forgivenessSeconds to indicate the duration of time it tolerates a taint.
2. update taint api types, added a new field to indicate the time the taint is added.

**Which issue this PR fixes** : 
Related issue: #1574
Related PR: #34825 

**Special notes for your reviewer**:

**Release note**:

```release-note
forgiveness alpha version api definition
```
2017-01-27 10:38:31 -08:00
juanvallejo 5ec2a4c3ca only output "No resources found." for human readable printers 2017-01-27 13:30:23 -05:00
Kubernetes Submit Queue 312c44da2e Merge pull request #40542 from deads2k/generic-29-simple
Automatic merge from submit-queue

move packages to apimachinery and apiserver

more no-dep dependencies.

@sttts see commit names

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-27 09:26:35 -08:00
Jordan Liggitt 31136b6f19
Update translation bindata 2017-01-27 09:56:52 -05:00
Wojciech Tyczynski f81e9fd000 Merge pull request #40592 from kubernetes/revert-40239-disk_pod_lifecycle
Revert "Delay deletion of pod from the API server until volumes are deleted"
2017-01-27 15:54:18 +01:00
Wojciech Tyczynski 2d0fe16463 Minor cleanup in getting from apiserver cache in kubelet 2017-01-27 15:36:37 +01:00
Jordan Liggitt 9013e8a7cf
Test cascading delete without client-side reaper does not GET 2017-01-27 09:18:48 -05:00
Jordan Liggitt 3590928fa9
Add OWNERS file for pkg/serviceaccount 2017-01-27 09:11:04 -05:00
Jordan Liggitt 07f14ebc6f
Update authn/authz owners and reviewers 2017-01-27 08:55:44 -05:00
deads2k aea12038b4 move storage/storagebackend to apiserver 2017-01-27 08:49:55 -05:00
deads2k 9775269fb9 move genericapiserver/server/filters to apiserver 2017-01-27 08:49:30 -05:00
deads2k c6fd6941a1 move pkg/api/validation/path to apimachinery 2017-01-27 08:49:29 -05:00
Kubernetes Submit Queue 4447290096 Merge pull request #40389 from smarterclayton/use_meta
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

Use metav1.*Options in genericapiserver

Treat DeleteOptions as unversioned in metainternalversion for decoding
of bodies from older clients. Use the metav1 Options structs from
generic api server and the appropriate codec.

Completes the move to using generic server side code for API objects

@sttts
2017-01-27 05:41:49 -08:00
Kubernetes Submit Queue 1625150de8 Merge pull request #40260 from liggitt/kubectl-tpr
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

make kubectl generic commands work with unstructured objects

part of making apply, edit, label, annotate, and patch work with third party resources

fixes #35149
fixes #34413

prereq of:
https://github.com/kubernetes/kubernetes/issues/35496
https://github.com/kubernetes/kubernetes/pull/40096

related to:
https://github.com/kubernetes/kubernetes/issues/39906
https://github.com/kubernetes/kubernetes/issues/40119

kubectl is currently decoding any resource it doesn't have compiled-in to a ThirdPartyResourceData struct, which means it computes patches using that struct, and would try to send a ThirdPartyResourceData object to the API server when running `apply`

This PR removes the behavior that decodes unknown objects into ThirdPartyResourceData structs internally, and fixes up the following generic commands to work with unstructured objects

- [x] apply
  - [x] decode into runtime.Unstructured objects
  - [x] successfully use `--record` with unregistered objects 
- [x] patch
  - [x] decode into runtime.Unstructured objects
  - [x] successfully use `--record` with unregistered objects 
- [x] describe
  - [x] decode into runtime.Unstructured objects
  - [x] implement generic describer
- [x] fix other generic kubectl commands to work with unstructured objects
  - [x] label
  - [x] annotate

follow-ups for pre-existing issues:
- [ ] `explain` doesn't work with unregistered resources
- [ ] remove special casing of federation group in clientset lookups, etc
- [ ] `patch`
  - [ ] doesn't honor output formats when persisting to server (`kubectl patch -f svc.json --type merge -p '{}' -o json` doesn't output json)
  - [ ] --local throws exception (`kubectl patch -f svc.json --type merge -p '{}' --local`)
- [ ] `apply`
  - [ ] fall back to generic JSON patch computation if no go struct is registered for the target GVK (e.g. https://github.com/kubernetes/kubernetes/pull/40096)
  - [ ] ensure subkey deletion works in CreateThreeWayJSONMergePatch
  - [ ] ensure type stomping works in CreateThreeWayJSONMergePatch
  - [ ] lots of tests for generic json patch computation
  - [ ] prevent generic apply patch computation among different versions
  - [ ] reconcile treatment of nulls with https://github.com/kubernetes/kubernetes/pull/35496
- [ ] `edit`
  - [ ] decode into runtime.Unstructured objects
  - [ ] fall back to generic JSON patch computation if no go struct is registered for the target GVK
2017-01-27 05:41:45 -08:00
Kubernetes Submit Queue 10e3edcaa4 Merge pull request #39223 from brendandburns/i18n
Automatic merge from submit-queue (batch tested with PRs 39223, 40260, 40082, 40389)

Add a script to extract strings for translation and a sample of it's output

@fabianofranz @deads2k @kubernetes/sig-cli-pr-reviews
2017-01-27 05:41:44 -08:00
Kevin d72b32b9d2 update generated files 2017-01-27 20:55:31 +08:00
Kevin 72a19819a6 api changes of forgiveness phase1 2017-01-27 20:55:24 +08:00
Aleksandra Malinowska 74e1d8078e Revert "Delay deletion of pod from the API server until volumes are deleted" 2017-01-27 13:31:02 +01:00
Kubernetes Submit Queue e6e17a5be6 Merge pull request #40572 from yujuhong/cri_cleanup
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

docker-CRI: Remove legacy code for non-grpc integration

A minor cleanup to remove the code that is no longer in use to simplify the logic.
2017-01-27 01:34:22 -08:00
Kubernetes Submit Queue fb201dc838 Merge pull request #40564 from Random-Liu/add-container-not-found-error
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

Add IsContainerNotFound in kube_docker_client

This PR added `IsContainerNotFound` function in kube_docker_client and changed dockershim to use it.

@yujuhong @freehan
2017-01-27 01:34:21 -08:00
Kubernetes Submit Queue 88890f586c Merge pull request #40126 from resouer/return-value
Automatic merge from submit-queue (batch tested with PRs 40126, 40565, 38777, 40564, 40572)

Do not swallow error in asw.updateNodeStatusUpdateNeeded

Ref #39056

Bubble the error up to `SetNodeUpdateStatusNeeded` and log it out.

NOTE: This does not modify interface of `SetNodeUpdateStatusNeeded`
2017-01-27 01:34:16 -08:00
Clayton Coleman a591242061
Use metav1.*Options in genericapiserver
Treat DeleteOptions as unversioned in metainternalversion for decoding
of bodies from older clients. Use the metav1 Options structs from
generic api server and the appropriate codec.
2017-01-27 01:25:29 -05:00
Madhusudan.C.S 4f969bdfc2 Add helpers for creating an RBAC RoleBinding. 2017-01-26 20:29:07 -08:00
Kubernetes Submit Queue 1b8ae3a76a Merge pull request #40543 from deads2k/generic-30-feature
Automatic merge from submit-queue (batch tested with PRs 40543, 39999)

remove pkg/feature dependency from genericapiserver.

@sttts I think you just forgot this when you were snipping the rest of the link.  If I understood the previous pull correctly, this ought to ensure proper registration of the bits we need, right?
2017-01-26 18:07:27 -08:00
Yu-Ju Hong 202488995a docker-CRI: Remove legacy code for non-grpc integration 2017-01-26 17:23:20 -08:00
Jordan Liggitt 408a978f26
fix --record to work with unstructured objects 2017-01-26 19:59:27 -05:00
Jordan Liggitt c317f92990
patch: allow --local to use structs for strategic merge, warn about unknown objects 2017-01-26 19:59:26 -05:00
Jordan Liggitt 424dac921f
Fall back to unstructured typer retrieving GVKs for printing 2017-01-26 19:59:26 -05:00
Jordan Liggitt aaf96a1048
apply: use unstructured objects 2017-01-26 19:59:26 -05:00
Jordan Liggitt d41e391799
describe: allow describing generic api objects 2017-01-26 19:59:26 -05:00
Jordan Liggitt 06c12f6716
describe: use unstructured objects 2017-01-26 19:59:25 -05:00
Jordan Liggitt b6d4f371cd
patch: use unstructured objects 2017-01-26 19:59:25 -05:00
Jordan Liggitt 89266588d1
label: use unstructured objects 2017-01-26 19:59:25 -05:00
Jordan Liggitt 9b60d7fd84
annotate: use unstructured objects 2017-01-26 19:59:24 -05:00
Jordan Liggitt dd6d454848
kubectl: remove ThirdPartyResourceData behavior for unregistered objects 2017-01-26 19:59:24 -05:00
Jordan Liggitt a82c4481f3
Distinguish between client and unstructuredclient in fake factory 2017-01-26 19:59:16 -05:00
Jordan Liggitt a57307a429
bazel 2017-01-26 19:59:16 -05:00
Random-Liu e5ee619449 Add IsContainerNotFound in kube_docker_client and change dockershim to
use it.
2017-01-26 16:10:50 -08:00
Kubernetes Submit Queue 892cd7a2a5 Merge pull request #40547 from PI-Victor/fix_typo_logging
Automatic merge from submit-queue (batch tested with PRs 40046, 40073, 40547, 40534, 40249)

fix a typo in cni log

**What this PR does / why we need it**:
fixes a typo s/unintialized/uninitialized in pkg/kubelet/network/cni/cni.go

**Release note**:

```release-note
```
2017-01-26 16:10:38 -08:00
Kubernetes Submit Queue e3a3743410 Merge pull request #40073 from matthyx/master
Automatic merge from submit-queue (batch tested with PRs 40046, 40073, 40547, 40534, 40249)

Issue #13501 - printEvent Source to much more cleaner

Create a formatEventSource func and use it.



**What this PR does / why we need it**:
Adds a smarter way to print EventSource, removing "{ }" and the eventual extra ", " when Host is empty.
It was also reported in OpenShift issue https://github.com/openshift/origin/issues/6586

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

**Special notes for your reviewer**:
I have used this new func in all user facing printouts, but there are other places where EventSource are printed to logs, like DumpEventsInNamespace in test/e2e/framework/util.go for instance.
Don't know if I should correct there too...

**Release note**:

```release-note
Improve formatting of EventSource in kubectl get and kubectl describe
```
2017-01-26 16:10:36 -08:00
Kubernetes Submit Queue bef60b8602 Merge pull request #40046 from juanvallejo/jvallejo/update-multiple-types-requested-check
Automatic merge from submit-queue (batch tested with PRs 40046, 40073, 40547, 40534, 40249)

update check for "all" resources

This patch updates the check for `all` resources to handle cases where a resource's name is "all". Rather than cycling through all given args until `all` is found, this patch makes sure that only a single argument `all` was specified at all.

**Release note**:
```release-note
release-note-none
```

@fabianofranz @pwittrock
2017-01-26 16:10:34 -08:00
Kubernetes Submit Queue ae1c9a2b25 Merge pull request #40360 from wojtek-t/speedup_secret_manager
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

Optimize secret manager to refresh secrets from apiserver cache

Ref #19188

@liggitt
2017-01-26 14:23:45 -08:00
Kubernetes Submit Queue 5f01179aff Merge pull request #40448 from Random-Liu/work-around-container-create-conflict
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

CRI: Work around container create conflict.

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

This PR added a random suffix in the container name when we:
* Failed to create the container because of "Conflict".
* And failed to remove the container because of "No such container".

@yujuhong @feiskyer 
/cc @kubernetes/sig-node-bugs
2017-01-26 14:23:43 -08:00
Kubernetes Submit Queue aace5a7b87 Merge pull request #40449 from deads2k/client-15-types
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

move the discovery and dynamic clients

Moved the dynamic client, discovery client, testing/core, and testing/cache to `client-go`.  Dependencies on api groups we don't have generated clients for have dropped out, so federation, kubeadm, and imagepolicy.

@caesarxuchao @sttts 

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-26 14:23:42 -08:00
Kubernetes Submit Queue cfafc575dd Merge pull request #40397 from yujuhong/protoc_settings
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

CRI: use more gogoprotobuf plugins

Generate marshaler/unmarshaler code should help improve the performance.

This addresses #40098
2017-01-26 14:23:39 -08:00
Kubernetes Submit Queue 7857b9acdf Merge pull request #40239 from dashpole/disk_pod_lifecycle
Automatic merge from submit-queue

Delay deletion of pod from the API server until volumes are deleted

Depends on #37228, and will not pass tests until that PR is merged, and this is rebased.

Keeps all kubelet behavior the same, except the kubelet will not make the "Delete" call (kubeClient.Core().Pods(pod.Namespace).Delete(pod.Name, deleteOptions)) until the volumes associated with that pod are removed.  I will perform some performance testing so that we better understand the latency impact of this change.

Is kubelet_pods.go the correct file to include the "when can I delete this pod" logic?

cc: @vishh @sjenning @derekwaynecarr
2017-01-26 13:46:02 -08:00
Kubernetes Submit Queue 9ea9480650 Merge pull request #40312 from p0lyn0mial/add_shortName_to_the_api
Automatic merge from submit-queue

Added shortName to meta.v1.APIResource.

The shortNames would be used to allow kubectl to have short names representations of resources from aggregated API servers.


```release-note
Adds `shortNames` to the `APIResource` from discovery which is a list of recommended shortNames for clients like `kubectl`.
```



**What this PR does / why we need it**:
The shortNames would be used to allow kubectl to have short names representations of resources from aggregated API servers.


**Special notes for your reviewer**:
I have followed the steps described here [Changing the internal structures](https://github.com/kubernetes/community/blob/master/contributors/devel/api_changes.md)

I have run the following scripts:

hack/update-codegen.sh
hack/update-generated-protobuf.sh
hack/update-codecgen.sh
hack/update-openapi-spec.sh
hack/update-swagger-spec.sh
hack/update-federation-openapi-spec.sh
hack/update-api-reference-docs.sh

See also:

#[38755](https://github.com/kubernetes/kubernetes/pull/38755)
#[38835](https://github.com/kubernetes/kubernetes/pull/38835#event-914403188) 


**Release note**:

Extended meta.v1.APIResource by a list of short names. The short names would be used to allow kubectl to have short names representations of resources from aggregated API servers.
2017-01-26 12:45:55 -08:00
PI-Victor 388144f769
fix a typo in cni log 2017-01-26 21:27:38 +01:00
Kubernetes Submit Queue 15466fcca9 Merge pull request #40535 from kubernetes/grodrigues3-patch-1
Automatic merge from submit-queue

Update OWNERS for pkg/controller/deployment

Add approvers to the leaf owners file.

**Release note**:
```NONE
```
2017-01-26 11:59:01 -08:00
Wojciech Tyczynski 220cfdff91 Optimize secret manager to refresh secrets from apiserver cache 2017-01-26 20:54:45 +01:00
deads2k b511741df7 remove pkg/feature dependency from genericapiserver. 2017-01-26 14:53:05 -05:00
Kubernetes Submit Queue 5b75980c32 Merge pull request #40261 from kargakis/fix-deployment-completeness
Automatic merge from submit-queue

controller: old pods should block deployment completeness

Fixes https://github.com/kubernetes/kubernetes/issues/40207
2017-01-26 11:08:03 -08:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
divyenpatel 7baa1c7365 fix for vSphere DeleteVolume 2017-01-26 10:25:07 -08:00
grodrigues3 38938cc4d3 Update OWNERS for pkg/controller/deployment
Add approvers to the leaf owners file.
2017-01-26 10:24:52 -08:00
Morgan Bauer 32ec6bc5e8
fix typo in logging statement 2017-01-26 10:37:51 -07:00
Kubernetes Submit Queue eb8d34ba63 Merge pull request #40523 from gmarek/owners
Automatic merge from submit-queue

Modify OWNERS in some pkg/controller subdirectories
2017-01-26 09:21:47 -08:00
Slava Semushin c52d367ecd pkg/kubelet/dockertools/docker_manager.go: remove unused const. 2017-01-26 17:00:16 +01:00
Slava Semushin 37a8caf2a5 pkg/kubelet/dockertools/docker_manager.go: remove unused errors. 2017-01-26 17:00:06 +01:00
Kubernetes Submit Queue ff67d8218e Merge pull request #40430 from deads2k/generic-28-factory
Automatic merge from submit-queue

move genericapiserver authenticator and authorizer factories

straight move to `apiserver`
2017-01-26 07:37:43 -08:00
gmarek 045fb5a7c6 Modify OWNERS in some pkg/controller subdirectories 2017-01-26 16:28:08 +01:00
Kubernetes Submit Queue 122bf004bf Merge pull request #38987 from seeekr/patch-2
Automatic merge from submit-queue

fix typo in describe.go

**What this PR does / why we need it**: fixes typo in `kubectl describe nodes` command

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-26 06:31:57 -08:00
deads2k 0d8e6b8500 move genericapiserver authenticator and authorizer factories 2017-01-26 08:50:47 -05:00
deads2k 2734f8f892 move dynamic and discovery clients 2017-01-26 08:37:06 -05:00
Kubernetes Submit Queue 373ff83518 Merge pull request #40351 from sttts/sttts-owners
Automatic merge from submit-queue

genericapiserver: update OWNERS

- adding myself to approvers
- add OWNERS file to staging/src/k8s.io/apiserver
2017-01-26 05:21:14 -08:00
Kubernetes Submit Queue cd4b9ca079 Merge pull request #40500 from kubernetes/revert-40359-owners-01-kubectl
Automatic merge from submit-queue

Revert "update kubectl approvers"

Reverts kubernetes/kubernetes#40359
2017-01-26 05:05:05 -08:00
Matthias Bertschy 42eb8ff0e7 Issue #13501 - create a formatEventSource func and use it. 2017-01-26 08:23:44 +01:00
Brendan Burns e8b0f59ed2 Add a script to extract strings for translation and a sample of what it does. 2017-01-25 22:08:02 -08:00
Kubernetes Submit Queue 28c439dcfb Merge pull request #40393 from ReneSaenz/rename_controller17648
Automatic merge from submit-queue (batch tested with PRs 38739, 40480, 40495, 40172, 40393)

Rename controller pkg/registry/core/controller to pkg/registry/core/r…

…eplicationcontroller



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

Rename controller pkg/registry/core/controller to pkg/registry/core/replicationcontroller
This will clarify the purpose of the controller since intent is replicationcontroller

Please refer to 
https://github.com/kubernetes/kubernetes/issues/17648

**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**:
NONE
**Release note**:

```NONE
```
2017-01-25 21:20:33 -08:00
Kubernetes Submit Queue 52863de51d Merge pull request #40495 from yujuhong/fnv_hash
Automatic merge from submit-queue (batch tested with PRs 38739, 40480, 40495, 40172, 40393)

Use fnv hash in the CRI implementation

fnv is more stable than adler. This PR changes CRI implementation to
use fnv for generating container hashes, but leaving the old
implementation (dockertools/rkt). This is because hash is what kubelet
uses to identify a container -- changes to the hash will cause kubelet
to restart existing containers. This is ok for CRI implementation (which
requires a disruptive upgrade already), but not for older implementations.

#40140
2017-01-25 21:20:31 -08:00
Kubernetes Submit Queue 9bd1b90c33 Merge pull request #38739 from foxyriver/close
Automatic merge from submit-queue

Object r repeat close

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

Object r repeat close. 
each end of the for loop, the object r has been closed. so omitting defer r.close(), to avoid repeat close.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-25 21:06:33 -08:00
Kubernetes Submit Queue b9eb3e9d68 Merge pull request #40195 from fraenkel/env_secret_secretmgr
Automatic merge from submit-queue (batch tested with PRs 39538, 40188, 40357, 38214, 40195)

Use SecretManager when getting secrets for EnvFrom

Merges crossed in the night which missed this needed change.
2017-01-25 17:47:16 -08:00
Kubernetes Submit Queue a931b7e238 Merge pull request #40357 from sttts/sttts-more-cutoffs-2
Automatic merge from submit-queue (batch tested with PRs 39538, 40188, 40357, 38214, 40195)

genericapiserver: cut off more dependencies – episode 2

Compare commit subjects.

approved based on #40363
2017-01-25 17:47:13 -08:00
grodrigues3 61e9454883 Revert "update kubectl approvers" 2017-01-25 17:32:22 -08:00
Kubernetes Submit Queue e9819106e0 Merge pull request #40467 from liggitt/serviceaccount-owners
Automatic merge from submit-queue

Add serviceaccount owners files

Poor @derekwaynecarr is the sole approver/reviewer for the entire admission package.

This adds OWNERS files for service account controller and admission packages
2017-01-25 15:07:59 -08:00
Yu-Ju Hong 87f1291c19 Use fnv hash in the CRI implementation
Leave the old implementation (dockertools/rkt) untouched so that
containers will not be restarted during kubelet upgrade. For CRI
implementation (kuberuntime), container restart is required for kubelet
upgrade.
2017-01-25 15:01:41 -08:00
Minhan Xia 8e318b8d9b refactor hostport logic 2017-01-25 14:52:33 -08:00
Random-Liu 90e91a8989 Add unit test for the work around. 2017-01-25 14:15:41 -08:00
Random-Liu 1b1b444c46 Work around the container name conflict bug 2017-01-25 14:15:41 -08:00
Yu-Ju Hong 760d8e98e8 CRI: use more gogoprotobuf plugins
This includes generating marshaler/unmarshaler code to improve
performance.
2017-01-25 13:52:24 -08:00
p0lyn0mial 1c924ccd7e checking-in generated code 2017-01-25 22:05:21 +01:00
Jordan Liggitt ecb632abc4
Add serviceaccount owners files 2017-01-25 15:42:15 -05:00
Kubernetes Submit Queue de64280740 Merge pull request #40176 from timothysc/affinity_cleanup
Automatic merge from submit-queue (batch tested with PRs 40428, 40176)

Cleaup Affinity post conversion from annotations to fields

**What this PR does / why we need it**:
Cleans up leftover work from the conversion of affinity from annotations to fields.

fixes #40016 
related #25319 

**Special notes for your reviewer**:
There are some TODO items left for @luxas or @errordeveloper b/c they were trying to use affinity in a way that is not possible.  

**Release note**:

```release-note
NONE
```

/cc @kubernetes/sig-scheduling-misc @rrati
2017-01-25 12:40:34 -08:00
David Ashpole b1b9686c91 periodically check if pod can be deleted 2017-01-25 10:51:48 -08:00
Dr. Stefan Schimanski a0137e9b28 Update generated files 2017-01-25 19:49:45 +01:00
Dr. Stefan Schimanski e57d7b1c60 third_party/forked/golang/netutil: move to k8s.io/apimachinery 2017-01-25 19:45:10 +01:00
Dr. Stefan Schimanski d216ebef73 pkg/util: move proxy into k8s.io/apiserver 2017-01-25 19:45:10 +01:00
Dr. Stefan Schimanski d7eb3b6870 pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
Janet Kuo 81c1e0c6ac Address comments 2017-01-25 10:31:16 -08:00
David Ashpole 9094b57570 cleanup volumes before deleting from the api server 2017-01-25 10:21:15 -08:00
Janet Kuo 634b695573 Throw an error on failed daemon pods to prevent hotloop 2017-01-25 10:20:27 -08:00
Janet Kuo e46d445045 Add unit test for deleting failed daemon pods 2017-01-25 10:20:27 -08:00
Janet Kuo a2e1341e01 DaemonSet controller actively kills failed pods (to recreate them) 2017-01-25 10:20:26 -08:00
Kubernetes Submit Queue 90b5d4cbd8 Merge pull request #40421 from liggitt/revert-configmapedit
Automatic merge from submit-queue (batch tested with PRs 38905, 40421)

Revert "Add the ability to edit fields within a config map."

Fixes #40396 
This reverts commit 31eca372c9.

#38445 broke edit for all resources other than configmaps:
```
$ kubectl edit serviceaccount default
Error from server (NotFound): configmaps "serviceaccount" not found
```
also, `edit` is a generic command, we can't add subcommands that claim the `configmap` space and mess with the things resourcebuilder accepts
2017-01-25 09:49:49 -08:00
Dr. Stefan Schimanski fb60807040 genericapiserver: cut off pkg/api from responsewriters 2017-01-25 17:21:12 +01:00
Dr. Stefan Schimanski 8541304582 pkg/util: move CompileRegex helper into apiserver
This is a little helper, not a generic utility of general value.
2017-01-25 17:21:12 +01:00
Dr. Stefan Schimanski 3bd00afaf9 pkg/util: move Trie to k8s.io/apiserver 2017-01-25 17:21:12 +01:00
Kubernetes Submit Queue ebbf3a9383 Merge pull request #40359 from deads2k/owners-01-kubectl
Automatic merge from submit-queue

update kubectl approvers

All the other owners files have names (not groups).  Updated for individual users for approvers so `/approve` works.

@kubernetes/sig-cli-api-reviews
2017-01-25 08:17:26 -08:00
Kubernetes Submit Queue 5c5ce3baee Merge pull request #40362 from deads2k/client-14-move-pkgs
Automatic merge from submit-queue

move client/cache and client/discovery to client-go

mechanical changes to move those packages.  Had to create a `k8s.io/kubernetes/pkg/client/tests` package for tests that were blacklisted from client-go.  We can rewrite these tests later and move them, but for now they'll still run at least.

@caesarxuchao @sttts
2017-01-25 08:17:15 -08:00
Rene Saenz bfc0451da3 Executed update-bazel.sh 2017-01-25 09:44:51 -06:00
Kubernetes Submit Queue 748fb52cd5 Merge pull request #40416 from kargakis/kubectl-deployment-fix
Automatic merge from submit-queue (batch tested with PRs 40130, 40419, 40416)

kubectl: update deployment describer to correctly show total replicas

@kubernetes/sig-cli-misc
2017-01-25 07:22:59 -08:00
juanvallejo 1b8f4e0b7d update check for "all" resources 2017-01-25 10:15:29 -05:00
Kubernetes Submit Queue baaaf26609 Merge pull request #40130 from xilabao/change-to-v1beta1-in-create-rolebinding
Automatic merge from submit-queue

change APIVersion to v1beta1 in create rolebinding/clusterrolebinding
2017-01-25 06:51:33 -08:00
deads2k ce17351ca6 update kubectl approvers 2017-01-25 09:39:23 -05:00
Timothy St. Clair bfe41927ba Cleaup Affinity post conversion from annotations to fields 2017-01-25 08:32:28 -06:00
Jordan Liggitt 83e06d9fd1
Revert "Add the ability to edit fields within a config map."
This reverts commit 31eca372c9.
2017-01-25 09:12:32 -05:00
Shyam Jeedigunta b48de58311 Added OWNERS to kubemark subdirectories 2017-01-25 14:37:57 +01:00
Harry Zhang 70941f65bf Do not swallow error in volume 2017-01-25 21:29:48 +08:00
deads2k 502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
deads2k 3eeecb0848 preserve client tests that can't move to client-go 2017-01-25 08:29:48 -05:00
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
deads2k c2ae6d5b40 remove api to util dependency hiding types 2017-01-25 08:28:28 -05:00
Kubernetes Submit Queue 82a5cab1ce Merge pull request #39419 from nebril/no-more-panics-in-apiserver-logs
Automatic merge from submit-queue

Get rid of panics.go in apiserver logs

Displaying the place in which the "real" handler is was discarded as too
big change - it would cause all HTTP handlers need to handle request
logging on their own.

fixes #37706
2017-01-25 03:09:08 -08:00
Michail Kargakis e7a2b3e43a kubectl: update deployment describer to correctly show total replicas 2017-01-25 11:30:11 +01:00
Kubernetes Submit Queue 373e7ef0c0 Merge pull request #40294 from tsmetana/persistent-volume-test-refactor
Automatic merge from submit-queue (batch tested with PRs 39064, 40294)

Refactor persistent volume tests

This is an attempt to make the binder tests a bit more concise. The PVCs are being created by a "templating" function. There is also a handful of PVs in the tests but those vary quite more and I don't think similar approach would save us much code.

Reference:
https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29006#-KPJuVeDE0O6TvDP9jia

@jsafrane: I hope this is what you have on mind.
2017-01-25 02:05:57 -08:00
Maciej Kwiek 978d4f73e9 Get rid of panics.go in apiserver logs
Displaying the place in which the "real" handler is was discarded as too
big change - it would cause all HTTP handlers need to handle request
logging on their own.
2017-01-25 09:53:32 +01:00
Kubernetes Submit Queue d62fca231e Merge pull request #40142 from colemickens/colemickens-acr-login-server
Automatic merge from submit-queue (batch tested with PRs 37055, 40142)

azure: azure container registry: fix login server

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

Fixes the Azure Container Registry integration

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

**Special notes for your reviewer**:

Before this change, if I created an ACR with name `colemicktest`, then the login server would be `colemicktest-microsoft.azurecr.io`. This code was concating to form `colemicktest.azurecr.io` which does not work.

The fix is to reach into RegistryProperties and read out the login server domain name directly.

Also, this should eliminate that existed when ACR gets to sovereign clouds.

**Release note**:

```release-note
azure: fix Azure Container Registry integration
```
2017-01-25 00:40:02 -08:00
Kubernetes Submit Queue 5b391ae2e1 Merge pull request #37055 from mbohlool/dev
Automatic merge from submit-queue

Add version to OpenAPI spec

OpenAPI is missing a version string. It should follow kubernetes version. It is a bugfix that need to be cherrypicked in 1.5 too.
2017-01-25 00:07:40 -08:00
Alexander Block bf28a9be09 Set NetworkInterfaces and Subnets to nil before updating Azure security groups 2017-01-25 09:01:11 +01:00
foxyriver 7345b94387 Object r repeat close 2017-01-25 15:49:31 +08:00
Kubernetes Submit Queue e2c0bf3fca Merge pull request #40384 from zmerlynn/zmerlynn-owners
Automatic merge from submit-queue

pkg/cloudprovider/providers/aws: Add zmerlynn to OWNERS
2017-01-24 16:26:36 -08:00
Kubernetes Submit Queue df42444742 Merge pull request #40216 from sttts/sttts-more-cutoffs
Automatic merge from submit-queue (batch tested with PRs 39260, 40216, 40213, 40325, 40333)

genericapiserver: more dependency cutoffs

- cut-off pkg/api.Resource and friends - lgtm
- authn plugins -> k8s.io/apiserver - 
- webhook authz plugin -> k8s.io/apiserver - lgtm
- ~~pkg/cert -> k8s.io/apimachinery (will rebase on @deads2k's PR also moving it)~~
- split pkg/config into kubelet config merger and flags - lgtm
- split feature gate between generic apiserver and kube - lgtm
- move pkg/util/flag into k8s.io/apiserver - lgtm
2017-01-24 16:26:00 -08:00
Rene Saenz 1bf6c76928 Rename controller pkg/registry/core/controller to pkg/registry/core/replicationcontroller 2017-01-24 18:15:51 -06:00
Kubernetes Submit Queue a4f33195a3 Merge pull request #38880 from justinsb/peninsula_club
Automatic merge from submit-queue

AWS: trust region if found from AWS metadata

```release-note
AWS: trust region if found from AWS metadata
```

Means we can run in newly announced regions without a code change.

We don't register the ECR provider in new regions, so we will still need
a code change for now.

Fix #35014
2017-01-24 15:05:01 -08:00
Kubernetes Submit Queue aacb222085 Merge pull request #40344 from smarterclayton/move_all_options
Automatic merge from submit-queue

Move remaining *Options to metav1

Primarily delete options, but will remove all internal references to non-metav1 options (except ListOptions).

Still working through it @sttts @deads2k
2017-01-24 14:11:38 -08:00
Zach Loafman 3c9e35b4fb pkg/cloudprovider/providers/aws: Add zmerlynn to OWNERS 2017-01-24 12:36:03 -08:00
Dr. Stefan Schimanski 2b8e938128 Update generated files 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski d00c9a33f9 Add TODO for AppArmor validation depending on feature gate 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 82826ec273 pkg/util/flag: move to k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski a6b2ebb50c pkg/flag: make feature gate extensible and split between generic and kube 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 56d60cfae6 pkg/util: move flags from pkg/util/config to pkg/util/flags 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 4beba154b4 genericapiserver: move authz webhook plugins into k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 4077e0bba7 genericapiserver: move authn plugins into k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski f36a3d8e0c genericapiserver: cut off pkg/api.Resource dependency 2017-01-24 20:56:03 +01:00
Kubernetes Submit Queue 92c5457854 Merge pull request #40327 from yujuhong/rm_code
Automatic merge from submit-queue (batch tested with PRs 39275, 40327, 37264)

dockertools: remove some dead code

Remove `dockerRoot` that's not used anywhere.
2017-01-24 10:52:10 -08:00
Kubernetes Submit Queue 284dfb270e Merge pull request #39275 from ivan4th/fix-bad-fake-runtime-time-values
Automatic merge from submit-queue

Fix bad time values in kubelet FakeRuntimeService

These values don't affect tests but they can be confusing
for developers looking at the code for reference.
2017-01-24 10:50:14 -08:00
Clayton Coleman be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
Clayton Coleman 7b1c715496
generated: Move references to metav1.*Options 2017-01-24 13:41:48 -05:00
Clayton Coleman fca7e00608
Move all *Options to metav1 2017-01-24 13:15:26 -05:00
Kubernetes Submit Queue f18a921a03 Merge pull request #40311 from deads2k/client-13-move-util
Automatic merge from submit-queue (batch tested with PRs 40299, 40311)

move authoritative client-go util out of pkg

Move `client-go/pkg/util` which are authoritative to `client-go/util` to make it easier to reason about what comes from where.
2017-01-24 08:59:59 -08:00
Kubernetes Submit Queue 68f123dfa0 Merge pull request #37275 from xiangfeiz/cinder-rescan-scsi
Automatic merge from submit-queue

Adding rescan scsi controller for cinder

For lsilogic scsi controller, attached cinder volume does not
appear under /dev/ automatically unless do a rescan.
This approach was used in vSphere volume provider before PR #27496
dropped support for lsilogic scsi controller.
2017-01-24 06:24:59 -08:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
Michael Fraenkel 7ddad11058 Use SecretManager when getting secrets for EnvFrom 2017-01-24 05:05:48 -07:00
mbohlool 2c23c68eff Add version to OpenAPI spec 2017-01-24 02:28:24 -08:00
Dr. Stefan Schimanski c696b56921 pkg/genericapiserver: add myself to approvers for endpoints and server 2017-01-24 09:43:57 +01:00
Kubernetes Submit Queue 43286a82c6 Merge pull request #39981 from fraenkel/optional_configmaps_secrets
Automatic merge from submit-queue

Optional configmaps and secrets

Allow configmaps and secrets for environment variables and volume sources to be optional

Implements approved proposal c9f881b7bb

Release note:
```release-note
Volumes and environment variables populated from ConfigMap and Secret objects can now tolerate the named source object or specific keys being missing, by adding `optional: true` to the volume or environment variable source specifications.
```
2017-01-23 23:06:35 -08:00
Kubernetes Submit Queue f545d6ad47 Merge pull request #40057 from MrHohn/kubectl-create-seletor
Automatic merge from submit-queue (batch tested with PRs 40328, 40057)

Allows kubectl create -f to filter by selector.

From #32544.

The underlying `seletor` infrastructrue was implemented by #32599. The test is basically copy-paste of the corresponding test for `kubectl apply -f -l`.

```release-note
kubectl create now accepts the label selector flag for filtering objects to create
```
2017-01-23 22:19:11 -08:00
Lou Yihua 352d64ab0d Eliminate "Unknown service type: ExternalName"
As the ExternalName service is supported, the warning message: "Unknown
service type: ExternalName" should be eliminated from rest.go.
2017-01-24 13:15:36 +08:00
Michael Fraenkel ca207be4a3 Generated code 2017-01-23 20:12:24 -07:00
Pengfei Ni e2fa0ea87d CRI: verify responses from remote runtime 2017-01-24 10:16:17 +08:00
Michael Fraenkel 4e466040d9 Allow Optional ConfigMap and Secrets
- ConfigMaps and Secrets for Env or Volumes are allowed to be optional
2017-01-23 18:59:49 -07:00
Xing Zhou 0177cbae75 Improve error messages for ValidateObject method.
Improved error messages for method #ValidateObject in
pkg/api/validation/schema.go.
2017-01-24 09:12:06 +08:00
xilabao d969edebe5 change APIVersion to v1beta1 in create rolebinding/clusterrolebinding 2017-01-24 08:32:56 +08:00
Clayton Coleman 9009c1ac14
generated: informer,client 2017-01-23 17:52:47 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman 245b592fac
Convert core code to metav1.ListOptions 2017-01-23 17:52:45 -05:00
Clayton Coleman a35be4e02e
Update registries to use metainternalversion list options 2017-01-23 17:52:45 -05:00
Clayton Coleman 3ba366fcf1
Switch genericapiserver to use metainternalversion.ListOptions
Decouple ListOption parsing from the scheme - instead, it is a property
of the server (and clients should use metav1.ListOptions for now).
2017-01-23 17:52:42 -05:00
Yu-Ju Hong c1d043af18 dockertools: remove some dead code 2017-01-23 14:34:56 -08:00
Clayton Coleman c12344b3b8
Tests that check metav1 2017-01-23 16:53:19 -05:00
Clayton Coleman f623a8c908
Make all groups use metav1.AddToGroupVersion for ListOptions 2017-01-23 16:53:18 -05:00
Clayton Coleman 4f865efdb9
Create meta/internalversion for ListOptions
Move over only the conversions that are needed, create a new scheme that
is private to meta and only accessible via ParameterCodec. Move half of
pkg/util/labels/.readonly to pkg/apis/meta/v1/labels.go
2017-01-23 16:53:18 -05:00
Clayton Coleman df831db360
Break dependency on testapi from core packages 2017-01-23 16:53:13 -05:00
Kubernetes Submit Queue 13424d874b Merge pull request #40208 from wojtek-t/smart_volume_manager
Automatic merge from submit-queue (batch tested with PRs 40205, 40208)

Make secret volume plugin use secret manager

Ref #19188

@gmarek
2017-01-23 13:40:03 -08:00
Kubernetes Submit Queue aee38b13a6 Merge pull request #40010 from sttts/sttts-timeout-error-group-resource
Automatic merge from submit-queue (batch tested with PRs 39341, 40010)

genericapiserver/api/filters: cut off pkg/api dependency and fix timeout status

The timeout status did not have a proper group version and verb. With the `RequestInfo` available we can easily create a proper status object.

As a side-product we cut off the dependency to `pkg/api` from `genericapiserver/api/filters`.

Follow-up with version negotiation is here: https://github.com/kubernetes/kubernetes/pull/40211
2017-01-23 12:23:04 -08:00
Kubernetes Submit Queue fce60637ae Merge pull request #39341 from smarterclayton/termination_log
Automatic merge from submit-queue

Improve TerminationMessagePath to be more flexible

* Support `terminationMessagePolicy: fallbackToLogsOnError` which allows pod authors to get useful information from containers as per kubernetes/community#154
* Set an upper bound on the size of the termination message path or log output to prevent callers from DoSing the master
* Add tests for running as root, non-root, and for the new terminationMessagePolicy cases.

I set the limit to 4096 bytes, but this may be too high for large pod containers.  Probably need to set an absolute bound, i.e. max message size allowed is 20k total, and we truncate if we're above that limit.

Fixes #31839, #23569

```release-note
A new field `terminationMessagePolicy` has been added to containers that allows a user to request `FallbackToLogsOnError`, which will read from the container's logs to populate the termination message if the user does not write to the termination message log file.  The termination message file is now properly readable for end users and has a maximum size (4k bytes) to prevent abuse.  Each pod may have up to 12k bytes of termination messages before the contents of each will be truncated.
```
2017-01-23 12:13:33 -08:00
Dr. Stefan Schimanski 128594d17c genericapiserver/api/filters: cut off pkg/api dependency and fix timeout status 2017-01-23 19:06:51 +01:00
Antoine Pelisse 62af7dd33d OWNERS: Update latest OWNERS files
These files have been created lately, so we don't have much information
about them anyway, so let's just:
- Remove assignees and make them approvers
- Copy approves as reviewers
2017-01-23 10:05:48 -08:00
Clayton Coleman 6ea557d4b2
Fix tests after new defaulted value added 2017-01-23 12:37:21 -05:00
Clayton Coleman 2bb2604f0b
Limit the size of the termination log and allow log input
Enforce the following limits:

12kb for total message length in container status
4kb for the termination message path file
2kb or 80 lines (whichever is shorter) from the log on error

Fallback to log output if the user requests it.
2017-01-23 12:26:38 -05:00
Clayton Coleman eff134cd5f
Use chmod to bypass umask on termination log file
os.Create() will obey the umask which results in the file being 0644
when injected in the container.
2017-01-23 12:26:37 -05:00
Clayton Coleman e6d35b0362
generated: api 2017-01-23 12:26:35 -05:00
Clayton Coleman be3ce22dd3
Add TerminationMessagePolicy 2017-01-23 12:26:00 -05:00
Kubernetes Submit Queue 46bfa1ee11 Merge pull request #39933 from pmorie/generic-registry-feedback
Automatic merge from submit-queue

Make generic registry easier to understand

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

This PR makes the generic registry and some areas of the api REST abstractions easier to understand by adding and clarifying comments.  These comments are based on digging that was done to implement a new API server and REST storage for resources in a wholly-new API group.

**Release note**:
```release-note
NONE
```
2017-01-23 09:17:27 -08:00
Kubernetes Submit Queue 5ea80569ae Merge pull request #40227 from deads2k/client-11-easy
Automatic merge from submit-queue

make client-go tools/auth and tools/clientcmd authoritative

These moved easily.  Pure mechanical.  I'll have a couple snip pulls for some of the more complicated packages.  `pkg/util/homedir` was a transitive that moved with. It was only used in `kubectl` and you'd need it to be consistent with `clientcmd` loading order.

@sttts
2017-01-23 09:07:17 -08:00
Kubernetes Submit Queue 1f1f3692bd Merge pull request #38445 from brendandburns/configmap2
Automatic merge from submit-queue (batch tested with PRs 38445, 40292)

Add the ability to edit fields within a config map.

Addresses part of https://github.com/kubernetes/kubernetes/issues/36222

Example command:

```console
$ kubectl edit configmap foo --config-map-data=bar
```

Will open the data element named `bar` in the `ConfigMap` named `foo` in `$EDITOR`, the edited contents are then updated back to the config map.

@kubernetes/sig-cli 

```release-note
Add a special purpose tool for editing individual fields in a ConfigMap with kubectl
```
2017-01-23 08:11:06 -08:00
Wojciech Tyczynski e0784f2e00 Propage secret volumes in secret manager 2017-01-23 16:10:01 +01:00
Wojciech Tyczynski bf7138652f SecretVolume using secret manager 2017-01-23 16:10:01 +01:00
deads2k 335ef747d6 mechanical 2017-01-23 10:03:55 -05:00
Paul Morie 22ecfe5d14 Make generic registry easier to understand 2017-01-23 09:51:09 -05:00
Kubernetes Submit Queue ff0ec5cd7a Merge pull request #40293 from deads2k/generic-27-announce
Automatic merge from submit-queue

separate announce factories

We caught this part way through Daniel's refactor from 1.5.  Have to separate announce factories to be able to double register types for client-go.

@kubernetes/sig-apimachinery-misc
2017-01-23 06:51:08 -08:00
Kubernetes Submit Queue 23694f9939 Merge pull request #40277 from liggitt/builtin-nil-check
Automatic merge from submit-queue (batch tested with PRs 40196, 40143, 40277)

avoid incorrect short-circuit of client-ca setup

PasswordFile options should only affect computation of the SupportsBasicAuth field, not short-circuit setting up the client ca certpool
2017-01-23 05:39:05 -08:00
Kubernetes Submit Queue 71c918d95c Merge pull request #40143 from peay/event-when-cronjob-cannot-start
Automatic merge from submit-queue (batch tested with PRs 40196, 40143, 40277)

Emit warning event when CronJob cannot determine starting time

**What this PR does / why we need it**:
In #39608, we've modified the error message for when a CronJob has too many unmet starting times to enumerate to figure out the next starting time. This makes it more "actionable", and the user can now set a deadline to avoid running into this. However, the error message is still only controller level AFAIK and thus not exposed to the user. From his perspective, there is no way to tell why the CronJob is not scheduling the next instance.

The PR adds a warning event in addition to the error in the controller manager's log. 

**Which issue this PR fixes**: This is an addition to PR #39608  regarding #36311.

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

**Release note**:

```release-note
```
2017-01-23 05:39:03 -08:00
Kubernetes Submit Queue 0c41d538fc Merge pull request #40196 from resouer/remove-todo
Automatic merge from submit-queue

Remove TODOs to refactor kubelet labels

To address #39650 completely.

Remove label refactoring TODOs, we don't need them since CRI rollout is on the way.
2017-01-23 05:07:32 -08:00
deads2k 7cc9702402 separate announce factories 2017-01-23 08:02:14 -05:00
Kubernetes Submit Queue ee70adb9e7 Merge pull request #39243 from k82cn/avoid_keyword
Automatic merge from submit-queue

Avoid keyword as var name.

fixes typo
2017-01-23 04:22:33 -08:00
Kubernetes Submit Queue 36aa4a9ac0 Merge pull request #40225 from shiywang/newtest
Automatic merge from submit-queue (batch tested with PRs 40066, 36250, 40255, 40225, 40204)

Fix validation errors in cli are cryptic

fix issue https://github.com/kubernetes/kubernetes/issues/39811

now the error message is like: 
`error validating "/home/shiywang/template/test.yaml": error validating data: field ports for v1.ServiceSpec: is required; if you choose to ignore these errors, turn validation off with --validate=false`

still need add some unit test, plz don't test now
2017-01-23 02:29:09 -08:00
Kubernetes Submit Queue 5775b57f36 Merge pull request #40255 from k82cn/rm_short_pkg_name
Automatic merge from submit-queue (batch tested with PRs 40066, 36250, 40255, 40225, 40204)

Remove short pkg name.

Remove un-necessary short pkg name.
2017-01-23 02:29:08 -08:00
Tomas Smetana 382f7bc9cc Refactor persistent volume tests 2017-01-23 10:43:44 +01:00
Kubernetes Submit Queue 5356a16f01 Merge pull request #40066 from vwfs/reduce_azure_polling_time
Automatic merge from submit-queue

Set custom PollingDelay of 5 seconds for Azure VirtualMachinesClient

The default polling delay of 1 minute results in very long delays when
an Azure Disk is attached to a node. It gets worse as go-autorest
doubles the default delay to 2 minutes.

Please see: https://github.com/kubernetes/kubernetes/issues/35180#issuecomment-273085063

Only the PollingDelay for VirtualMachinesClient is modified here to
avoid too much pressure on Azure quotas.

Release Nodes:
```release-note
Reduce time needed to attach Azure disks
```
2017-01-23 01:16:25 -08:00
Kubernetes Submit Queue 2ab65eede6 Merge pull request #40199 from foxyriver/no-use
Automatic merge from submit-queue (batch tested with PRs 39199, 37273, 29183, 39638, 40199)

declare it, but no use it

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

declare it, but no use it

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-23 00:30:17 -08:00
Kubernetes Submit Queue b84fdaece1 Merge pull request #29183 from kargakis/fix-conversion-annotation
Automatic merge from submit-queue (batch tested with PRs 39199, 37273, 29183, 39638, 40199)

Invalidate updates to non-convertible selectors

Follow-up to https://github.com/kubernetes/kubernetes/pull/24733

@deads2k @lavalamp @smarterclayton @bgrant0607 @liggitt @mfojtik 

First commit contains the necessary validation for replication controllers with non-convertible selectors.
Second commit updates the name for the annotation added during conversion since it is invalid currently:

```
+++ [0719 11:19:54] Running tests without code coverage
--- FAIL: TestValidateUpdate (0.00s)
    strategy_test.go:191: unexpected error: [metadata.annotations: Invalid value: "kubernetes.io/non-convertible/spec.selector": must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName', metadata.annotations: Invalid value: "kubernetes.io/non-convertible/spec.selector": must match the regex ([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9] (e.g. 'MyName' or 'my.name' or '123-abc') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName']
FAIL
FAIL    k8s.io/kubernetes/pkg/registry/controller   0.015s
```
2017-01-23 00:30:14 -08:00
Kubernetes Submit Queue 5c5b901611 Merge pull request #37273 from brendandburns/race
Automatic merge from submit-queue (batch tested with PRs 39199, 37273, 29183, 39638, 40199)

Add a log at the start of a watch request.

Fixes https://github.com/kubernetes/kubernetes/issues/16899  (> than a year old!)

@lavalamp
2017-01-23 00:30:13 -08:00
xilabao 93c63d76e8 fix --save-config in create subcommand 2017-01-23 15:15:37 +08:00
Ryan Hitchman 9cd159a191 Revert "Remove conversion package" 2017-01-22 15:41:06 -08:00
Jordan Liggitt c6c0b8518e
avoid incorrect short-circuit of client-ca setup 2017-01-22 14:50:42 -05:00
Harry Zhang 6fd6f0e4a6 Remove TODOs to refactor kubelet labels 2017-01-22 13:07:19 +08:00
Michail Kargakis 506e71485f controller: old pods should block deployment completeness 2017-01-21 23:52:05 +01:00
Michail Kargakis e634c90c64 api: rename non-convertible annotation prefix to be valid 2017-01-21 23:42:55 +01:00
Michail Kargakis 1d3748d7e5 registry: invalidate updates to non-convertible selectors 2017-01-21 23:42:55 +01:00
Klaus Ma 72c76a3b0a Remove short pkg name. 2017-01-21 18:51:01 +08:00
Brendan Burns 2f2d1b6620 Add a log at the start of a watch request. 2017-01-20 20:55:33 -08:00
Kubernetes Submit Queue 8d5227bb2e Merge pull request #40210 from mikebryant/fix-kubelet-node-deletion-typo
Automatic merge from submit-queue (batch tested with PRs 40250, 40134, 40210)

Typo fix: Change logging function to formatting version

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

Slightly broken logging message:
```
I0120 10:56:08.555712    7575 kubelet_node_status.go:135] Deleted old node object %qkubernetes-cit-kubernetes-cr0-0
```
2017-01-20 18:15:36 -08:00
Kubernetes Submit Queue a32c34d1e5 Merge pull request #40134 from nebril/remove-conversion
Automatic merge from submit-queue (batch tested with PRs 40250, 40134, 40210)

Remove conversion package

This package is empty, it would be nice if we could remove it.
2017-01-20 18:15:35 -08:00
Kubernetes Submit Queue 6b293d4c13 Merge pull request #40242 from mikedanese/csr-get-help
Automatic merge from submit-queue (batch tested with PRs 40120, 40242)

add csr to kubectl get help
2017-01-20 16:25:46 -08:00
Kubernetes Submit Queue 88257cfb19 Merge pull request #39797 from fraenkel/portforward_ws_api
Automatic merge from submit-queue

Port forward over websockets API

The API changes for port forwarding over websockets
2017-01-20 15:05:33 -08:00
Kubernetes Submit Queue 66c59e491e Merge pull request #40240 from ncdc/shared-informers-01
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

Expose ForResource in generated informer factory, copy lister expansions

Expose ForResource in generated informer factory

Copy lister expansions from pkg/client/cache into pkg/client/listers

@deads2k
2017-01-20 14:22:53 -08:00
Kubernetes Submit Queue e4804a6164 Merge pull request #40237 from derekwaynecarr/remove_pet
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

Fixup pet terminology in log and user-facing events

**What this PR does / why we need it**:
Removes some user-facing strings for pet terminology.
2017-01-20 14:22:52 -08:00
Kubernetes Submit Queue 470e732d7f Merge pull request #40235 from deads2k/generic-26-listers
Automatic merge from submit-queue (batch tested with PRs 40232, 40235, 40237, 40240)

move listers out of cache to reduce import tree

Moving the listers from `pkg/client/cache` snips links to all the different API groups from `pkg/storage`, but the dreaded `ListOptions` remains.

@sttts
2017-01-20 14:22:51 -08:00
Kubernetes Submit Queue ffb2dc2e02 Merge pull request #40187 from tianshapjq/adjust-delete-pod-uid-helpinfo
Automatic merge from submit-queue (batch tested with PRs 40187, 40231, 40152)

remove the delete-pod-uid spec

**What this PR does / why we need it**:
remove the specifications about "kubectl delete pod uid" cause it's no longer supported.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #40121
2017-01-20 13:29:45 -08:00
Mike Danese e1491aa788 add csr to kubectl get help 2017-01-20 13:14:51 -08:00
Kubernetes Submit Queue 85d328f8da Merge pull request #40189 from xilabao/patch-5
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

update short help message in set resource

To keep the help message well-formed.
```
#kubectl set -h           
Configure application resources 

These commands help you make changes to existing application resources.

Available Commands:
  image       Update image of a pod template
  resources   update resource requests/limits on objects with pod templates
  selector    Set the selector on a resource

Usage:
  kubectl set SUBCOMMAND [options]
```

```release-note
NONE
```
2017-01-20 12:34:59 -08:00
Kubernetes Submit Queue b5929bfb2b Merge pull request #38789 from jessfraz/cleanup-temp-dirs
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
2017-01-20 12:34:58 -08:00
Kubernetes Submit Queue 63eb043d74 Merge pull request #40146 from deads2k/api-61-announce
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

move apimachinery/announced to apimachinery

This also rewires the announce package to allow installation into multiple groups via multiple calls to `install.Install`.  At some point, we'll want to unwire the hardcoded, "install to this scheme" call.

@lavalamp something we've wanted for a while and need for genericapiserver
@seh you've asked related questions
@sttts ptal.  First commit is interesting, second commit is a straight move.
2017-01-20 12:34:54 -08:00
Kubernetes Submit Queue dcf14add92 Merge pull request #37228 from sjenning/teardown-terminated-volumes
Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

kubelet: storage: teardown terminated pod volumes

This is a continuation of the work done in https://github.com/kubernetes/kubernetes/pull/36779

There really is no reason to keep volumes for terminated pods attached on the node.  This PR extends the removal of volumes on the node from memory-backed (the current policy) to all volumes.

@pmorie raised a concern an impact debugging volume related issues if terminated pod volumes are removed.  To address this issue, the PR adds a `--keep-terminated-pod-volumes` flag the kubelet and sets it for `hack/local-up-cluster.sh`.

For consideration in 1.6.

Fixes #35406

@derekwaynecarr @vishh @dashpole

```release-note
kubelet tears down pod volumes on pod termination rather than pod deletion
```
2017-01-20 12:34:52 -08:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
Derek Carr 8ad16dfcab Fixup pet terminology in log and user-facing events 2017-01-20 14:47:11 -05:00
Kubernetes Submit Queue 54ff406702 Merge pull request #40159 from euank/beware-of-shadows
Automatic merge from submit-queue (batch tested with PRs 40011, 40159)

dockertools/nsenterexec: fix err shadow

The shadow of err meant the combination of `exec-handler=nsenter` +
`tty` + a non-zero exit code meant that the exit code would be LOST
FOREVER 👻

This isn't all that important since no one really used the nsenter exec
handler as I understand it

```release-note
NONE
```
2017-01-20 10:48:45 -08:00
Ivan Shvedunov 7a4ecc5c58 Fix bad time values in kubelet FakeRuntimeService
These values don't affect tests but they can be confusing
for developers looking at the code for reference.
2017-01-20 20:44:04 +03:00
Andy Goldstein e5dd576b31 Copy lister expansions
Copy lister expansions from pkg/client/cache into pkg/client/listers
2017-01-20 12:41:37 -05:00
Andy Goldstein 307acab3f3 Expose ForResource in generated informer factory 2017-01-20 12:41:37 -05:00
deads2k 9d3dfbf630 move apimachinery/announced to apimachinery 2017-01-20 12:20:13 -05:00
deads2k dfd8db8ae9 allow API groups to be installed and registered in multiple schemes 2017-01-20 12:19:49 -05:00
Kubernetes Submit Queue 22a405055d Merge pull request #40170 from deads2k/client-10-restclient
Automatic merge from submit-queue (batch tested with PRs 36693, 40154, 40170, 39033)

make client-go authoritative for pkg/client/restclient

Moves client/restclient to client-go and a util/certs, util/testing as transitives.
2017-01-20 09:18:52 -08:00
Seth Jennings e2750a305a reclaim terminated pod volumes 2017-01-20 11:08:35 -06:00
shiywang 6f5b8af725 fix validation errors in cli are cryptic
typo
2017-01-21 00:44:48 +08:00
Kubernetes Submit Queue 53b43d6f8f Merge pull request #40190 from yujuhong/nsenter_exec
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

dockershim: add support for the 'nsenter' exec handler

This change simply plumbs the kubelet configuration
(--docker-exec-handler) to DockerService.

This fixes #35747.
2017-01-20 08:28:53 -08:00
Kubernetes Submit Queue 0e1a166c4d Merge pull request #39158 from feiskyer/cri-proto3
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

CRI: upgrade protobuf to v3

For #38854, this PR upgrades CRI protobuf version to v3, and also updated related packages for confirming to new api.  

**Release note**:

```
CRI: upgrade protobuf version to v3.
```
2017-01-20 08:28:49 -08:00
Kubernetes Submit Queue 9841162445 Merge pull request #40165 from Random-Liu/fix-kubelet-owner-file
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190)

Small fix in kubelet owner file.

/cc @apelisse @dchen1107 @timstclair
2017-01-20 08:28:47 -08:00
Michael Fraenkel 08d0c86629 Generated code 2017-01-20 10:06:24 -06:00
Michael Fraenkel eb5d59467e Portforward API 2017-01-20 09:48:05 -06:00
Dan Winship 1f6735c518 Validate NetworkPolicy Ports
Protocol must be "TCP", "UDP", or nil.
Integer-valued port must be 1-65535.
String-valued port must be a syntactically valid ContainerPort name.
2017-01-20 09:26:42 -05:00
Dan Winship 83ac613b89 Fix up existing NetworkPolicy validation
Paths were wrong for most errors.
Field name was wrong for namespaceSelector.
2017-01-20 09:19:17 -05:00
deads2k 9c6a522882 mechanical results of client auth plugin 2017-01-20 08:05:18 -05:00
deads2k 2f51cc4ce4 move client auth plugins 2017-01-20 08:04:53 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
deads2k 32a2c2d05c remove old restclient 2017-01-20 07:56:35 -05:00
Mike Bryant a507777de8 Change logging function to formatting version 2017-01-20 11:24:05 +00:00
Maciej Kwiek 2220c6dfbf pkg/util/iptables missing unit tests
Added tests for Save, SaveAll, Restore and RestoreAll
2017-01-20 10:50:45 +01:00
Euan Kemp d55776e85a dockertools/nsenterexec: fix err shadow
The shadow of err meant the combination of `exec-handler=nsenter` +
`tty` + a non-zero exit code meant that the exit code would be LOST
FOREVER 👻

This isn't all that important since no one really used the nsenter exec
handler as I understand it
2017-01-20 01:19:18 -08:00
foxyriver cbb8f903e1 declare it, but no use it 2017-01-20 15:14:52 +08:00
Kubernetes Submit Queue 71802d2dc1 Merge pull request #40023 from soltysh/completions_boilerplate
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853)

Allow setting copyright header file for generated completions

This PR allows downstream vendors (like openshift) to generate completions with custom header, similarly to other generated code.

@fabianofranz ptal
@kubernetes/sig-cli-misc fyi
2017-01-19 18:53:47 -08:00
Kubernetes Submit Queue 2d4d2f913f Merge pull request #39446 from fraenkel/env_secrets
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853)

Create environment variables from secrets

Allow environment variables to be populated from entire secrets.

**Release note**:
```release-note
Populate environment variables from a secrets.
```
2017-01-19 18:53:45 -08:00
Kubernetes Submit Queue 4e3488ee99 Merge pull request #39831 from jessfraz/fix-38774
Automatic merge from submit-queue (batch tested with PRs 39772, 39831, 39481, 40167, 40149)

Check if error is Status in result.Stream()

Fix #38774

This adds the same functionality to `.Stream()` that was added to `.Error()`, `.Into()`, and `.Get()` in ce187f9c6a to try decoding the body as a Status.

This broke `.Stream()` because the decoding of the body as `Status` was removed from `transformResponse` in ce187f9c6a (diff-de85e3effc36b7bbe3fb9eae6c833cf3L933)
2017-01-19 17:56:45 -08:00
Pengfei Ni 53c20e3630 kubelet/kuberuntime: update cri to protobuf v3 2017-01-20 09:55:56 +08:00
Pengfei Ni d4bfcd1fda kubelet/dockershim: update cri to protobuf v3 2017-01-20 09:55:37 +08:00
Pengfei Ni e77e61b3bb kubelet/rktshim: update cri to protobuf v3 2017-01-20 09:55:19 +08:00
Pengfei Ni 76afc7300d kubelet/remote: update cri to protobuf v3 2017-01-20 09:55:07 +08:00
Pengfei Ni 8e4ea2dd15 kubelet/server: update cri to protobuf v3 2017-01-20 09:54:49 +08:00
Pengfei Ni 97fff6a7cf kubelet/api: update cri to protobuf v3 2017-01-20 09:54:28 +08:00
Pengfei Ni 9cab3b4a07 CRI: update protobuf to v3 2017-01-20 09:54:03 +08:00
Kubernetes Submit Queue 51919b4e1e Merge pull request #39772 from mikedanese/v1beta1
Automatic merge from submit-queue

promote certificates api to beta

Mostly posting to see what breaks but also this API is ready to be promoted.

```release-note
Promote certificates.k8s.io to beta and enable it by default. Users using the alpha certificates API should delete v1alpha1 CSRs from the API before upgrading and recreate them as v1beta1 CSR after upgrading.
```

@kubernetes/api-approvers @jcbsmpsn @pipejakob
2017-01-19 17:48:16 -08:00
Kubernetes Submit Queue 0610a23986 Merge pull request #40164 from apelisse/update-root-approvers-files
Automatic merge from submit-queue

Update root approvers files

Replaces #40040 

Update top level OWNERS files mostly to set assignees to approvers. Also remove @bgrant0607 from everywhere but the very top level OWNERS file.
2017-01-19 17:02:18 -08:00
Kubernetes Submit Queue f83802b317 Merge pull request #36984 from wojtek-t/secret_manager
Automatic merge from submit-queue

Create SecretManager interface and switch to caching secrets in kubelet

Ref #19188

Obviously we would need to extend the interface to solve #19188 but this is good first step anyway.
2017-01-19 17:02:08 -08:00
xilabao 5b3d59c235 update short help message in set resource 2017-01-19 18:53:43 -06:00
Klaus Ma 92f3ffb741 Avoid keyword as var name. 2017-01-20 08:48:09 +08:00
Yu-Ju Hong f9479ed84b dockershim: add support for the 'nsenter' exec handler
This change simply plumbs the kubelet configuration
(--docker-exec-handler) to DockerService.
2017-01-19 16:23:48 -08:00
tianshapjq 69946cf886 remove the delete-pod-uid spec 2017-01-20 08:16:20 +08:00
Mike Danese 44b7246568 autogenerated 2017-01-19 14:24:45 -08:00
Mike Danese 96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
Garrett Rodrigues ad1e5e98c2 Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
gmarek 3c0d2bb1f0 Add SecretManager to Kubelet 2017-01-19 20:12:04 +01:00
Michael Fraenkel 5048c01861 Generated code 2017-01-19 14:07:10 -05:00