Commit Graph

14043 Commits (70d6fe6d1c2262a4309b5a2e793ecafff1701367)

Author SHA1 Message Date
Kubernetes Submit Queue 70d6fe6d1c Merge pull request #30255 from Random-Liu/add-container-port-label
Automatic merge from submit-queue

Kubelet: Add container ports label.

Addresses https://github.com/kubernetes/kubernetes/pull/30049#discussion_r73983952.

Add container ports label, although we don't use it now, it will make it easier to switch to new runtime interface in the future.

@yujuhong @feiskyer
2016-08-08 23:28:05 -07:00
Kubernetes Submit Queue f218aa4b10 Merge pull request #30236 from mikedanese/csr-approval
Automatic merge from submit-queue

csr: add approval to the typed client

ref #30163

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30236)
<!-- Reviewable:end -->
2016-08-08 22:54:19 -07:00
Kubernetes Submit Queue b0ea89c2f6 Merge pull request #30049 from feiskyer/kuberuntime-labels
Automatic merge from submit-queue

Kubelet: implement labels for new runtime API

Implement labels for new runtime API. Part of #28789 . 


CC @yujuhong @Random-Liu @kubernetes/sig-node

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30049)
<!-- Reviewable:end -->
2016-08-08 21:39:38 -07:00
Kubernetes Submit Queue a9b6f695da Merge pull request #28480 from caesarxuchao/gc-save-only-meta
Automatic merge from submit-queue

[GarbageCollector] only store typeMeta and objectMeta in the gc store

GC only needs to know the apiVersion, kind, and objectMeta of an object. This PR makes the stores of GC only save these fields.
cc @kubernetes/sig-api-machinery

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28480)
<!-- Reviewable:end -->
2016-08-08 20:28:37 -07:00
Pengfei Ni e8fcafc925 Kubelet: implement labels for kuberuntime 2016-08-09 10:01:45 +08:00
Random-Liu ade092fe77 Add container ports label. 2016-08-08 18:40:18 -07:00
Kubernetes Submit Queue 16621cd32d Merge pull request #30022 from juanvallejo/jvallejo_add-timeout-unit-to-scale-help
Automatic merge from submit-queue

Update scale cmd help to display duration "units" in --timeout usage

release-note-none

`kubectl scale` has `--timeout` option, but the help info does not give accepted time units.

The help info gives default value 0 without a unit, potentially misleading a user into thinking they need to pass the numbered time only.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30022)
<!-- Reviewable:end -->
2016-08-08 17:58:02 -07:00
Chao Xu 4d2350632c only store typeMeta and objectMeta in the gc store 2016-08-08 17:23:13 -07:00
Kubernetes Submit Queue d52204a1aa Merge pull request #27109 from asalkeld/more-create-commands
Automatic merge from submit-queue

Add service and deployment create sub-commands to kubectl

```release-note
Added new commands kubectl create service & kubectl create deployment
```
Partial #25382
2016-08-08 16:53:18 -07:00
Mike Danese c131fbaf17 csr: add approval to the typed client 2016-08-08 16:05:05 -07:00
Kubernetes Submit Queue fbcb946db9 Merge pull request #30231 from derekwaynecarr/inodes-summary-api
Automatic merge from submit-queue

Add total inodes to kubelet summary api

Needed to support inode based eviction thresholds as a percentage.

/cc @ronnielai @vishh @kubernetes/rh-cluster-infra
2016-08-08 12:59:52 -07:00
Kubernetes Submit Queue 5eb088ebed Merge pull request #30172 from yujuhong/interface_cleanup
Automatic merge from submit-queue

Repalce rawContainerID with containerID
2016-08-08 11:48:43 -07:00
derekwaynecarr 2563696719 Add total inodes to kubelet summary api 2016-08-08 12:20:14 -04:00
Tamer Tas 81fb8e1e11 pkg/util/exec: don't specify paths for echo
`ex.Command()` already searches the binary in PATH, no need to manually
specify it. `pkg/util/exec` tests fail in non-conventional environments
due to this (e.g. NixOS).
2016-08-08 16:17:25 +03:00
Kubernetes Submit Queue 5acf6fb03d Merge pull request #30188 from caesarxuchao/fix-authorization-1.4-client
Automatic merge from submit-queue

Install authorization group in 1.4 client

By the way, buried in my other PR there is an e2e test which will remind people adding this line.

@deads2k
2016-08-08 05:46:56 -07:00
Jan Safranek 3c5364954b Fix PVC.Status.Capacity and AccessModes after binding
Also, fix unit tests to have the same claim and volume sizes in most of the
tests where we don't test matching based on size and test for a specific size
when we do actually test the matching.
2016-08-08 10:45:42 +02:00
Angus Salkeld bd0b7528b5 Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
Angus Salkeld 42ca885edb Add "create service" sub-commands
This adds:
 create service clusterip
 create service nodeport
 create service loadbalancer
2016-08-08 12:31:21 +10:00
Angus Salkeld 2f7a1612db Fix namespace_test error message 2016-08-08 12:08:57 +10:00
Kubernetes Submit Queue 148b74881b Merge pull request #30181 from mikedanese/csr-delete
Automatic merge from submit-queue

add delete strategy to certificates registry

So that CSRs can be deleted.

cc @gtank 

```console
$ kubectl delete certificatesigningrequest foo
error: error when deleting "foo": http: server closed connection
```
and on the apiserver:
```
E0806 00:11:53.791039       5 runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:70
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:63
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:49
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/create.go:115
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/delete.go:50
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/registry/generic/registry/store.go:634
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:799
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:953
/usr/local/go/src/runtime/asm_amd64.s:1998
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0xa268ee]

goroutine 1161 [running]:
panic(0x2a00240, 0xc820014070)
        /usr/local/go/src/runtime/panic.go:481 +0x3e6
k8s.io/kubernetes/pkg/util/runtime.HandleCrash(0xc821ecbef8, 0x1, 0x1)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:56 +0x153
panic(0x2a00240, 0xc820014070)
        /usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/pkg/api/rest.objectMetaAndKind(0x0, 0x0, 0x7faf1332ee78, 0xc8220f0600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/create.go:115 +0x1ee
k8s.io/kubernetes/pkg/api/rest.BeforeDelete(0x0, 0x0, 0x7faf13188338, 0xc821e218f0, 0x7faf1332ee78, 0xc8220f0600, 0xc821eb11c0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/delete.go:50 +0x94
k8s.io/kubernetes/pkg/registry/generic/registry.(*Store).Delete(0xc82013c9a0, 0x7faf13188338, 0xc821e218f0, 0xc821e0bdde, 0xa, 0xc821eb11c0, 0x0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/registry/generic/registry/store.go:634 +0x3b8
k8s.io/kubernetes/pkg/apiserver.DeleteResource.func1.1(0x0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:799 +0xa4
k8s.io/kubernetes/pkg/apiserver.finishRequest.func1(0xc821e081e0, 0xc821eb12c0, 0xc821e08000, 0xc821e0bf80)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:953 +0xd9
created by k8s.io/kubernetes/pkg/apiserver.finishRequest
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:958 +0xf1
```
2016-08-07 13:04:35 -07:00
Chao Xu 58b6dee275 install authorization group in 1.4 client 2016-08-06 11:21:41 -07:00
Kubernetes Submit Queue 9132b68866 Merge pull request #30133 from ZTE-PaaS/zhangke-patch-022
Automatic merge from submit-queue

refractoring findContainerStatus of status_manager

make findContainerStatus of status_manager simple
2016-08-06 03:36:01 -07:00
Kubernetes Submit Queue b91de274c7 Merge pull request #30129 from lixiaobing10051267/masterName
Automatic merge from submit-queue

make correction to two variables in inverse order

from Fprintf info ""Renaming %s to %s\n", it should be renamed from old to new.
2016-08-06 03:01:14 -07:00
Kubernetes Submit Queue 3dad8f7c06 Merge pull request #29907 from luxas/lookup_ip_better
Automatic merge from submit-queue

[kubelet] Auto-discover node IP if neither cloud provider exists and IP is not explicitly specified

One example where the earlier implementation failed is when running kubelet on CoreOS (bare-metal), where the nameserver is set to `8.8.8.8`. kubelet tries to lookup the node name agains Google DNS, which obviously fails. The kubelet won't recover after that.

The workaround hsa been to set `--hostname-override` to an IP address, but it's quite annoying to try to make a multi-distro way of getting the IP in bash for example. This way is much cleaner.

Refactored the function a little bit at the same time

@vishh @yujuhong @resouer @Random-Liu
2016-08-06 02:26:30 -07:00
Kubernetes Submit Queue 94905bd7c0 Merge pull request #29619 from dims/fix-issue-23163
Automatic merge from submit-queue

Verify volume.GetPath() never returns ""

Add a new helper method volume.GetPath(Mounter) instead of calling
the GetPath() of the Mounter directly. Check if GetPath() is returning
a "" and convert that into an error.

Fixes #23163
2016-08-06 01:44:15 -07:00
Kubernetes Submit Queue 5f44431275 Merge pull request #30007 from ericchiang/kubectl-config-set-credentials-auth-providers
Automatic merge from submit-queue

kubectl config set-crentials: add arguments for auth providers

This PR adds `--auth-provider` and `--auth-provider-arg` flags to the
`kubectl config set-credentials` sub-command.

There's currently no way of interacting with the new auth provider framework added in #23066 through kubectl. You have to render a custom kubeconfig to use them. Additionally `kubectl config set` just sort of craps out when attempting to interact with authentication info objects (#29312).

This is a minimal implementation of allowing `kubect config set-credentials` to set fields for client auth providers.

cc @cjcullen @kubernetes/kubectl
2016-08-05 22:22:22 -07:00
Kubernetes Submit Queue e628f6fa1d Merge pull request #29442 from xiangpengzhao/fix-log-info
Automatic merge from submit-queue

Log more info of container for debugging.
2016-08-05 19:19:19 -07:00
Kubernetes Submit Queue 9083ee971e Merge pull request #29137 from janetkuo/scheduledjob-controller
Automatic merge from submit-queue

Scheduledjob controller

Supersedes #25952; first 7 commits come from #25816

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

```release-note
```
2016-08-05 18:07:48 -07:00
Mike Danese d2ff93d19d add delete strategy to certificates registry
so that csrs can be deleted.
2016-08-05 17:34:03 -07:00
Yu-Ju Hong 93f0c5a8e5 Repalce rawContainerID with containerID 2016-08-05 16:26:47 -07:00
Kubernetes Submit Queue 2537f66f0e Merge pull request #29230 from luxas/goimport
Automatic merge from submit-queue

Run goimport for the whole repo

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
2016-08-05 16:22:01 -07:00
Kubernetes Submit Queue e84a8ec45a Merge pull request #28991 from ZTE-PaaS/zhangke-patch-008
Automatic merge from submit-queue

optimize conditions of ServiceReplenishmentUpdateFunc to replenish service

Originally, the  replenishQuota method didn't focus on the third parameter object even if others transfered to it, i think the function is not efficient and perfect. then i use the third param to get MatchResources, it will be more exact. for example, if the old pod was quota tracked and the new was not, the replenishQuota only focus on usage resource of the old pod, still if  the third parameter object is nil, the process will be same as before
2016-08-05 15:45:46 -07:00
Kubernetes Submit Queue 5f9447a91a Merge pull request #20573 from deads2k/plumb-in-SAR
Automatic merge from submit-queue

add subjectaccessreviews resource

Adds a subjectaccessreviews endpoint that uses the API server's authorizer to determine if a subject is allowed to perform an action.

Part of kubernetes/features#37
2016-08-05 14:39:28 -07:00
Janet Kuo da57c93a8a Fix errors, verification and test failures; add unit test for sj UpdateStatus 2016-08-05 13:35:39 -07:00
Eric Tune 8b2e248641 Add test and doc.go 2016-08-05 13:34:50 -07:00
Eric Tune 8675e014fb ScheduledJob controller 2016-08-05 13:34:50 -07:00
Kubernetes Submit Queue f9cadb290b Merge pull request #22919 from liggitt/http-test-etcd
Automatic merge from submit-queue

Allow starting test etcd with http

There are cases where we'll want to start a test etcd without https (external tools monitoring tests, tests with lots of parallelism, etc). This makes it an option.

Helps with https://github.com/kubernetes/kubernetes/issues/23127

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/22919)
<!-- Reviewable:end -->
2016-08-05 12:06:12 -07:00
Kubernetes Submit Queue 807241b84f Merge pull request #25707 from dims/fix-issue-14071
Automatic merge from submit-queue

Fix Incorrect response model for pods/{name}/log

The swagger spec for pods/{name}/log does not include
"text/plain" as a possible content-type for the the response.
So we implement ProducesMIMETypes to make sure "text/plain"
gets added to the default list ot content-types.

the v1.json was generated by running:
hack/update-generated-swagger-docs.sh;./hack/update-swagger-spec.sh;
2016-08-05 11:06:44 -07:00
Kubernetes Submit Queue e4b067efd0 Merge pull request #30125 from lixiaobing10051267/masterFormat
Automatic merge from submit-queue

Wrong format is used with single quotes in log

Wrong format is used with single quotes in log, should use ""
2016-08-05 10:29:52 -07:00
deads2k d9a203409a initial generated code for SAR 2016-08-05 11:37:43 -04:00
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
Davanum Srinivas e7a46a7c81 Fix Incorrect response model for pods/{name}/log
The swagger spec for pods/{name}/log does not include
"text/plain" as a possible content-type for the the response.
So we implement ProducesMIMETypes to make sure "text/plain"
gets added to the default list ot content-types.

the v1.json was generated by running:
hack/update-generated-swagger-docs.sh;./hack/update-swagger-spec.sh;

Fixes #14071
2016-08-05 08:54:14 -04:00
Davanum Srinivas ecda7c60c1 Allow empty value for env in kubectl run
Fixes #28734
2016-08-05 08:47:53 -04:00
Davanum Srinivas e0edfebe82 Verify volume.GetPath() never returns ""
Add a new helper method volume.GetPath(Mounter) instead of calling
the GetPath() of the Mounter directly. Check if GetPath() is returning
a "" and convert that into an error. At this point, we only have
information about the type of the Mounter, so let's log that if
there is a problem

Fixes #23163
2016-08-05 08:45:33 -04:00
Kubernetes Submit Queue 34e51d8ce9 Merge pull request #30095 from ronnielai/image-gc-2
Automatic merge from submit-queue

Moving image gc to pkg/kubelet/images
2016-08-05 03:11:33 -07:00
Ke Zhang 08d01a3879 refractoring findContainerStatus of status_manager 2016-08-05 17:52:02 +08:00
Kubernetes Submit Queue a13efbc01a Merge pull request #30070 from deads2k/fix-alias
Automatic merge from submit-queue

replace improper create quota alias

`q` is not a shortname for `resourcequota`, so it shouldn't be an alias for `kubectl create resourcequota`.

@sttts ptal
2016-08-05 02:36:44 -07:00
lixiaobing10051267 849a8df35d make correction to two variables in inverse order 2016-08-05 16:17:01 +08:00
lixiaobing10051267 11f5ced9d3 Wrong format is used with single quotes in log 2016-08-05 15:23:23 +08:00
Kubernetes Submit Queue 4d1da37129 Merge pull request #30021 from pweil-/protobuf-recognizingdecoder
Automatic merge from submit-queue

add asserts for RecognizingDecoder and update protobuf serializer

Ensure that serializers are asserting that they implement the `RecognizingDecoder` interface and update the protobuf serializer to add the `unknown` parameter.

Manifested in: https://github.com/openshift/origin/issues/9739

@smarterclayton @deads2k
2016-08-04 22:28:00 -07:00