Commit Graph

1149 Commits (5c1d7a7d999c9a97b7f5c4df059c40f1320be1c6)

Author SHA1 Message Date
Kubernetes Submit Queue 096dd4df50 Merge pull request #26510 from AdoHe/patch_test
Automatic merge from submit-queue

update strategic patch test for merge list of maps

Refer #26418 for more details. @janetkuo the test case is added, ptal.
2016-08-15 20:38:22 -07:00
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Kubernetes Submit Queue 69419a145a Merge pull request #29802 from jfrazelle/fix-go-vet-errors
Automatic merge from submit-queue

fix go vet errors

<!--
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
```

This fixes the `go vet` errors brought about by go 1.7 testing re (#28742).

The are all pretty trivial and mostly related to literal composites.

also related to #16086
2016-08-15 13:10:08 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Kubernetes Submit Queue 96655d7578 Merge pull request #30087 from dims/remove-pkill-dependency
Automatic merge from submit-queue

Remove kubelet pkill dependency

Issue #26093 identified pkill as one of the dependencies of kublet
which could be worked around.  Build on the code introduced for pidof
and regexp for the process(es) we need to send a signal to.

Related to #26093
2016-08-12 18:38:38 -07:00
Davanum Srinivas 24e8e12b04 Fix TestPidOf {procfs} - Take #2
We should not bailout when we get an error. We should continue
processing other files/directories. We were returning the
err passed in which was causing the processing to stop.

Fixes #30377
2016-08-11 17:36:04 -04:00
Kubernetes Submit Queue 342aac2ffd Merge pull request #30402 from dims/fix-issue-30377
Automatic merge from submit-queue

Fix intermittent failures in TestPidOf {procfs}

Bailout if WalkFunc is called with an error.

Fixes #30377

<!-- 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/30402)
<!-- Reviewable:end -->
2016-08-11 06:47:45 -07:00
Kubernetes Submit Queue 035ec518af Merge pull request #28387 from caesarxuchao/gc-latency-measure
Automatic merge from submit-queue

[GarbageCollector] measure latency

First commit is #27600.

In e2e tests, I measure the average time an item spend in the eventQueue(~1.5 ms), dirtyQueue(~13ms), and orphanQueue(~37ms). There is no stress test in e2e yet, so the number may not be useful.

<!-- 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/28387)
<!-- Reviewable:end -->
2016-08-11 02:33:55 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Davanum Srinivas e1ad642da0 Fix intermittent failures in TestPidOf {procfs}
Bailout if WalkFunc is called with an error.

Fixes #30377
2016-08-10 17:23:58 -04:00
Davanum Srinivas ce93cb9d9c Remove kubelet dependency on pkill
Issue #26093 identified pkill as one of the dependencies of kublet
which could be worked around.  Build on the code introduced for pidof
and regexp for the process(es) we need to send a signal to.

Related to #26093
2016-08-10 17:14:49 -04:00
Chao Xu 41572cb22d add metrics to gc 2016-08-10 12:45:06 -07:00
Kubernetes Submit Queue a40d2cd92e Merge pull request #30296 from deads2k/wq-metrics
Automatic merge from submit-queue

add metrics for workqueues

Adds prometheus metrics to work queues and enables them for the resourcequota controller.  It would be easy to add this to all other workqueue based controllers and gather basic responsiveness metrics.

@kubernetes/rh-cluster-infra helps debug quota controller responsiveness problems.

<!-- 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/30296)
<!-- Reviewable:end -->
2016-08-10 11:13:13 -07:00
deads2k b981ea1a70 add metrics for workqueues 2016-08-10 09:28:42 -04:00
Kubernetes Submit Queue 70d6d165d5 Merge pull request #30002 from dims/remove-pidof-dependency
Automatic merge from submit-queue

Remove kubelet dependency on pidof

Issue #26093 identified pidof as one of the dependencies of kublet
which could be worked around. In this PR, we just look at /proc
to construct the list of pids we need for a specified process
instead of running "pidof" executable

Related to #26093

<!-- 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/30002)
<!-- Reviewable:end -->
2016-08-09 23:32:51 -07:00
Kubernetes Submit Queue f53a35fb76 Merge pull request #29147 from caesarxuchao/cut-client-repo-staging
Automatic merge from submit-queue

Cut the client repo, staging it in the main repo

Tracking issue: #28559
ref: https://github.com/kubernetes/kubernetes/pull/25978#issuecomment-232710174

This PR implements the plan a few of us came up with last week for cutting client into its own repo:
1. creating "_staging" (name is tentative) directory in the main repo, using a script to copy the client and its dependencies to this directory
2. periodically publishing the contents of this staging client to k8s.io/client-go repo
3. converting k8s components in the main repo to use the staged client. They should import the staged client as if the client were vendored. (i.e., the import line should be `import "k8s.io/client-go/<pacakge name>`). This requirement is to ease step 4.
4. In the future, removing the staging area, and vendoring the real client-go repo.

The advantage of having the staging area is that we can continuously run integration/e2e tests with the latest client repo and the latest main repo, without waiting for the client repo to be vendored back into the main repo. This staging area will exist until our test matrix is vendoring both the client and the server.

In the above plan, the tricky part is step 3. This PR achieves it by creating a symlink under ./vendor, pointing to the staging area, so packages in the main repo can refer to the client repo as if it's vendored. To prevent the godep tool from messing up the staging area, we export the staged client to GOPATH in hack/godep-save.sh so godep will think the client packages are local and won't attempt to manage ./vendor/k8s.io/client-go.

This is a POC. We'll rearrange the directory layout of the client before merge.

@thockin @lavalamp @bgrant0607 @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/29147)
<!-- Reviewable:end -->
2016-08-09 17:12:14 -07:00
Davanum Srinivas 1fdcea28e5 Remove kubelet dependency on pidof
Issue #26093 identified pidof as one of the dependencies of kublet
which could be worked around. In this PR, we just look at /proc
to construct the list of pids we need for a specified process
instead of running "pidof" executable

Related to #26093
2016-08-09 19:55:24 -04:00
Timothy St. Clair 24993b0343 Update generated files due to dependency shift.
Also minor bug fix in federation api.
2016-08-09 10:41:09 -05: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
Chao Xu a771578a1c move pkg/util/ files to their own package to reduce client-go dependencies 2016-08-05 23:32:02 -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 b1f8ba9ddf Merge pull request #30014 from dims/remove-uname-dependency
Automatic merge from submit-queue

Remove kubelet dependency on uname

Let's avoid exec'ing stuff we don't have to.

Related to #26093
2016-08-04 21:22:25 -07:00
Kubernetes Submit Queue d10e47b891 Merge pull request #29928 from dubstack/bump-libcontainer
Automatic merge from submit-queue

Bump Libcontainer to latest head

@Random-Liu or @yujuhong Can any one of you please do a quick review.

I updated libcontainer in a previous PR but  #29492 reverted those changes. This is needed for #27204. 

Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-08-04 15:12:13 -07:00
Kubernetes Submit Queue 0410c33995 Merge pull request #29204 from aledbf/ingress-wildcard-hosts
Automatic merge from submit-queue

Allow leading * in ingress hostname

fixes #29043
2016-08-04 14:38:24 -07:00
Buddha Prakash 49201f6923 Update Libcontainer's Cgroup Config: AllowAllDevices to be Nil 2016-08-04 10:05:30 -07:00
Kubernetes Submit Queue 92518a8a32 Merge pull request #30036 from caesarxuchao/README-to-doc
Automatic merge from submit-queue

convert README.md to doc.go

It seems the convention is to use a doc.go, not a README.md.

I needed to work around this README.md when in #29147, see https://github.com/kubernetes/kubernetes/pull/29147#discussion-diff-73239124R73.
2016-08-03 23:28:55 -07:00
Manuel de Brito Fontes 60f4fbf4f2 Allow leading * in ingress hostname 2016-08-03 20:16:58 -04:00
Chao Xu 4c7514be13 convert README.md to doc.go 2016-08-03 16:38:29 -07:00
bindata-mockuser 832363442d Remove kubelet dependency on uname 2016-08-03 17:46:02 -04:00
Kubernetes Submit Queue 67c7401fd8 Merge pull request #26688 from asalkeld/more-unittests-util-env
Automatic merge from submit-queue

Increase the unit test coverage in pkg/util

These are easy to test, so lets increase coverage.
2016-08-03 13:43:28 -07:00
Kubernetes Submit Queue 24216fe02f Merge pull request #26958 from resouer/util-line
Automatic merge from submit-queue

Refactoring runner resource container linedelimiter to it's own pkg

Continuing my work ref #15634

Anyone is ok to review this fix.
2016-08-03 02:26:12 -07:00
Kubernetes Submit Queue 1edf254efb Merge pull request #25458 from errm/env-var-style-config-keys
Automatic merge from submit-queue

Allow Secret & ConfigMap keys to contain caps, dots, and underscores

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

Re: #23722

This makes loosens the regex used in in Secrets and ConfigMap,
in order to make environment variable style keys valid
2016-08-02 21:00:52 -07:00
k8s-merge-robot 7a62b9c8d1 Merge pull request #29523 from fraenkel/service_names_rfc1035
Automatic merge from submit-queue

Allow service names up to 63 characters (RFC 1035)

fixes #3752
2016-08-02 10:33:16 -07:00
k8s-merge-robot 68632db799 Merge pull request #27562 from 7ing/ipt
Automatic merge from submit-queue

improve iptables-restore implementation #27559

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
fixes #27559
- improve restoreInternal implementation in iptables
- add SetStdin and SetStdout functions to Cmd interface
- modify kubelet/prober and some tests in order to work with Cmd interface
2016-08-02 08:02:32 -07:00
Michael Fraenkel b1e7e6cf46 Service names conform to RFC 1035 2016-08-02 08:42:15 -06:00
Lucas Käldström c88a07ce1a Run goimports 2016-08-02 15:12:39 +03:00
k8s-merge-robot 01cd7f326e Merge pull request #29621 from resouer/uuid
Automatic merge from submit-queue

Refactor uuid into its own pkg util/uuid

Continuing my work ref #15634

Anyone can review this if he/she wants.
2016-08-01 22:21:30 -07:00
Michal Rostecki 59ca5986dd Print/log pointers of structs with %#v instead of %+v
There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
2016-08-01 22:27:56 +02:00
Ed Robinson d4969ff032
Allows Secret & ConfigMap Keys to look like Environment Variables
This makes environment variable style keys (uppercase with underscores) valid
in Secrets and ConfigMap.
2016-08-01 20:56:40 +01:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
k8s-merge-robot 5760acf603 Merge pull request #29596 from matttproud/fix/time-leaks/remainder
Automatic merge from submit-queue

pkg/various: plug leaky time.New{Timer,Ticker}s

According to the documentation for Go package time, `time.Ticker` and
`time.Timer` are uncollectable by garbage collector finalizers.  They
leak until otherwise stopped.  This commit ensures that all remaining
instances are stopped upon departure from their relative scopes.

Similar efforts were incrementally done in #29439 and #29114.

```release-note
* pkg/various: plugged various time.Ticker and time.Timer leaks.
```
2016-07-29 14:06:47 -07:00
Harry Zhang e0ab76019e Rename runnter pkg name 2016-07-29 02:37:00 -04:00
Harry Zhang 94c6994ab3 Move rlimit to it's own pkg 2016-07-29 02:34:54 -04:00
harry zhang b7a387c8f5 Refactoring runner 2016-07-29 02:34:54 -04:00
Harry Zhang 15d0f5cfd5 Move linedelimiter to it's own pkg
Refactoring resource container
2016-07-29 02:29:26 -04:00
k8s-merge-robot 9fab05fe59 Merge pull request #29743 from timothysc/wait_race_fix
Automatic merge from submit-queue

Fix race condition found in JitterUntil.

This was caused by the recent addition of "sliding"

manifested in: https://github.com/kubernetes/kubernetes/issues/26782
2016-07-28 22:35:21 -07:00
k8s-merge-robot eae90a3631 Merge pull request #26332 from resouer/util-debt
Automatic merge from submit-queue

Refactor util clock into it's own pkg

Continue my work ref #15634
2016-07-28 11:37:06 -07:00
Timothy St. Clair 842f15c3c6 Fix race condition found in JitterUntil. 2016-07-28 11:41:02 -05:00
k8s-merge-robot 62e7c57acc Merge pull request #29598 from matttproud/refactor/simplify/goroutinemap
Automatic merge from submit-queue

pkg/util/goroutinemap: apply idiomatic Go cleanups

Package goroutinemap can be structurally simplified to be more
idiomatic, concise, and free of error potential.  No structural changes
are made.

It is unconventional declare `sync.Mutex` directly as a pointerized
field in a parent structure.  The `sync.Mutex` operates on pointer
receivers of itself; and by relying on that, the types that contain
those fields can be safely constructed using
https://golang.org/ref/spec#The_zero_value semantic.

The duration constants are already of type `time.Duration`, so
re-declaring that is redundant.

/CC: @saad-ali
2016-07-28 04:44:26 -07:00
Harry Zhang cb14b35bde Refactor util clock into it's own pkg 2016-07-28 02:29:04 -04:00