Commit Graph

410 Commits (5e3f3b35e0b46bc3a3d35c4986220f36777431c2)

Author SHA1 Message Date
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue 2aa0704c0e Merge pull request #51754 from huzhengchuan/fix/event_name
Automatic merge from submit-queue (batch tested with PRs 51754, 53261, 53450). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Rename the name of event source in controller-manager

**What this PR does / why we need it**: Make the event source more obvious 

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

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-10-04 13:13:15 -07:00
Kubernetes Submit Queue 3cab0c9ffa Merge pull request #52764 from fate-grand-order/fix-typo
Automatic merge from submit-queue (batch tested with PRs 52831, 52764, 52763, 52673, 52558). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

fix typo
2017-09-23 22:57:49 -07:00
Kubernetes Submit Queue 446daf02a5 Merge pull request #52240 from mattjmcnaughton/mattjmcnaughton/do-not-import-apimachinery-from-staging
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Modify `apimachinery` imports using `staging`

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

Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>

**Release note**:
```release-note
NONE
```
2017-09-23 09:08:26 -07:00
Kubernetes Submit Queue 1c0f22ea01 Merge pull request #43016 from liggitt/time-added-pointer
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Omit timeAdded from taint when empty

Fixes omitempty portion of https://github.com/kubernetes/kubernetes/issues/42394
2017-09-22 23:35:52 -07:00
Kubernetes Submit Queue 6808e800c9 Merge pull request #51877 from kargakis/add-tnozicka
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

Remove kargakis from OWNERS, add tnozicka

/assign @smarterclayton 
/cc @janetkuo @tnozicka
2017-09-21 13:03:49 -07:00
fate-grand-order c00fce0c60 fix typo 2017-09-20 04:42:27 +00:00
Kubernetes Submit Queue 7ca9ec7932 Merge pull request #51081 from diegs/typo
Automatic merge from submit-queue (batch tested with PRs 51081, 52725). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

daemon_controller: fix typo.

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

I found a small typo while implementing #48841.

With the existing code, some edge cases might lead to the wrong pods
being deleted.

**Release note**:
```release-note
NONE
```
2017-09-19 13:34:55 -07:00
Michail Kargakis a702742d31
Remove kargakis from OWNERS, add tnozicka
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-09-19 11:05:23 +02:00
Kubernetes Submit Queue ea22affd08 Merge pull request #51796 from Dirbaio/fix/pod-node-switch
Automatic merge from submit-queue (batch tested with PRs 51796, 52223)

Fix pod and node names switched around in error message.

**What this PR does / why we need it**: This PR fixes a pod name and a node name switched around in an error message from the daemon controller.

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

**Special notes for your reviewer**: -

**Release note**:

```release-note
NONE
```
2017-09-15 05:51:21 -07:00
mattjmcnaughton 8323fb4b4f Modify `apimachinery` imports using `staging`
Currently some of the imports of `apimachinery` use
`k8s.io/kubernetes/staging/src/k8s.io/apimachinery...`. Replace
these with `k8s.io/apimachinery`, as is in use throughout the rest
of the code base.

Signed-off-by: mattjmcnaughton <mattjmcnaughton@gmail.com>
2017-09-10 10:19:30 -04:00
Jordan Liggitt 3cf760c57e
Change TimeAdded to pointer 2017-09-07 14:13:09 -04:00
David Ashpole 97ab99aaa0 remove OutOfDisk from controllers 2017-09-04 17:35:55 -07:00
zhengchuan hu 2b8891a59f rename the name of eventsource in controller-manager 2017-09-04 23:30:59 +08:00
Kubernetes Submit Queue 28857a2f02 Merge pull request #49142 from joelsmith/slowstart
Automatic merge from submit-queue (batch tested with PRs 50602, 51561, 51703, 51748, 49142)

Slow-start batch pod creation of rs, rc, ds, jobs

Prevent too-large replicas from generating enormous numbers
of events by creating only a few pods at a time, then increasing
the batch size when pod creations succeed. Stop creating batches
of pods when any pod creation errors are encountered.

Todo:

- [x] Add automated tests
- [x] Test ds

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

**Release note**:
```release-note
controllers backoff better in face of quota denial
```
2017-09-03 01:12:14 -07:00
Kubernetes Submit Queue 52e3fdacbb Merge pull request #51538 from kow3ns/less-ugly-names
Automatic merge from submit-queue (batch tested with PRs 51553, 51538, 51663, 51069, 51737)

Consistent Names for ControllerRevisions, ReplicaSets, and objects using GenerateName

**What this PR does / why we need it**:
Adds the rand.SafeEncodeString function and uses this function to generate names for ReplicaSets and ControllerRevisions.

```release-note
The names generated for ControllerRevision and ReplicaSet are consistent with the GenerateName functionality of the API Server and will not contain "bad words".
```
2017-09-02 21:57:59 -07:00
Joel Smith 1889a6ef52 Slow-start batch pod creation of rs, rc, ds, jobs
Prevent too-large replicas from generating enormous numbers
of events by creating only a few pods at a time, then increasing
the batch size when pod creations succeed. Stop creating batches
of pods when any pod creation errors are encountered.
2017-09-01 09:23:43 -06:00
Dario Nieuwenhuis af94c4e689 Fix pod and node names switched around in error message. 2017-09-01 16:12:49 +02:00
Kenneth Owens 8ad18bf2ec Ensures that the DaemonSet controller does not launch a Pod on a Node while waiting for a Pod that it has previously created to terminate. 2017-08-31 10:29:03 -07:00
Kenneth Owens 313a8b304a Adds the rand.SafeEncodeString function and uses this function to
generate names for ReplicaSets and ControllerRevisions.
2017-08-30 14:01:11 -07:00
Dr. Stefan Schimanski 1d053c4f7c controllers: simplify deepcopy calls 2017-08-29 19:21:24 +02:00
Kubernetes Submit Queue 9e69d5b8f0 Merge pull request #50595 from k82cn/k8s_50594
Automatic merge from submit-queue (batch tested with PRs 49850, 47782, 50595, 50730, 51341)

NodeConditionPredicates should return NodeOutOfDisk error.

**What this PR does / why we need it**:
In https://github.com/kubernetes/kubernetes/pull/49932 , I moved node condition check into a predicates; but it return incorrect error :(. 

We also need to add more cases to `TestNodeShouldRunDaemonPod` which is key function of DaemonSet.

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

**Release note**:

```release-note
None
```
2017-08-25 20:43:35 -07:00
Klaus Ma e4c58a3c02 Added test case for Predicates. 2017-08-25 19:13:41 +08:00
Diego Pontoriero 9baaeba435
daemon_controller: fix typo.
With the existing code, some edge cases might lead to the wrong pods
being deleted.
2017-08-21 23:05:27 -07:00
Kubernetes Submit Queue b59ad9cbff Merge pull request #50146 from gmarek/deepcopyinto
Automatic merge from submit-queue (batch tested with PRs 46512, 50146)

Make metav1.(Micro)?Time functions take pointers

Is there any reason for those functions not to be on pointers?
2017-08-19 11:28:15 -07:00
Di Xu 85602fd542 CollisionCount should have type int32 across controllers that use it for collision avoidance 2017-08-18 10:48:12 +08:00
gmarek 0504cfbc25 Make metav1.(Micro)?Time functions take pointers 2017-08-17 11:24:28 +02:00
Klaus Ma abee0ce8a3 NodeConditionPredicates should return NodeOutOfDisk error. 2017-08-14 15:17:56 +08:00
Kubernetes Submit Queue 941ad0164d Merge pull request #50407 from ixdy/gazelle-and-kazel
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Manage BUILD files using gazelle + kazel

**What this PR does / why we need it**: uses the upstream `gazelle` tool to manage go rules in BUILD files.
This is needed to support Bazel builds on Mac OS and Bazel cross compilation in general.

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

**Special notes for your reviewer**:
It's probably easiest to review this commit-by-commit:
* bump to latest `rules_go` (for recent `cgo_library` and `gazelle` improvements)
* update `kazel` with recent compatibility fixes (https://github.com/kubernetes/repo-infra/pull/28, https://github.com/kubernetes/repo-infra/pull/27), update `hack` scripts to download/build `gazelle`, and then run both `gazelle` and `kazel`. (Additionally make `gazelle` skip things it shouldn't touch.)
* run `hack/update-bazel.sh` to autogenerate everything
* remove the old `cgo_genrule` rules - these are now part of `go_library`
* remove the `automanaged` tags from all go rules - `gazelle` doesn't use them, and it prevents an old version of `kazel/gazel` from messing with the rules
* remove the `licenses()` rules from everywhere but `third_party/` - we don't need them, and `gazelle` won't add them on new `BUILD` files it generates.

**Release note**:

```release-note
NONE
```
for review:
/assign @mikedanese @spxtr 
for approval:
/assign @thockin
2017-08-11 14:13:57 -07:00
Kubernetes Submit Queue fcd2368d41 Merge pull request #49488 from k82cn/k8s_46935
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Requeue DaemonSets if non-daemon pods were deleted.

**What this PR does / why we need it**:
Requeue DaemonSets if no daemon pods were deleted.

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

**Release note**:

```release-note
None
```
2017-08-11 14:13:53 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Kubernetes Submit Queue 6cbfac2cf5 Merge pull request #50186 from k82cn/k8s_42001-4
Automatic merge from submit-queue

Task 2: Added toleration to DaemonSet pods for node condition taints

**What this PR does / why we need it**:
If TaintByCondition was enabled, added toleration to DaemonSet pods for node condition taints.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: part of #42001 

**Release note**:
```release-note
None
```
2017-08-11 05:58:30 -07:00
Klaus Ma fa432e131c Requeue DaemonSets if non-daemon pods were deleted. 2017-08-11 15:47:55 +08:00
Kubernetes Submit Queue 3e8a25e818 Merge pull request #50008 from atlassian/meta-controller-ref
Automatic merge from submit-queue

Migrate to controller references helpers in meta/v1

**What this PR does / why we need it**:
This is a follow up for #48319 that migrates all method usages to new methods in meta/v1.

**Special notes for your reviewer**:
Looking at each commit individually might be easier.

**Release note**:
```release-note
NONE
```
/sig api-machinery
/kind cleanup
2017-08-10 17:07:30 -07:00
Kubernetes Submit Queue 3900e36d62 Merge pull request #50124 from k82cn/k8s_49103
Automatic merge from submit-queue

Removed un-used InodePressure condition.

**What this PR does / why we need it**:
Removed un-used InodePressure condition; kubelet did not report it anymore, so remove it.

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

**Release note**:

```release-note
The node condition 'NodeInodePressure' was removed, as kubelet did not report it.
```
2017-08-07 21:36:48 -07:00
Klaus Ma 2ebd743be8 Added toleration for node condition taints. 2017-08-07 19:53:40 +08:00
Mikhail Mazurskiy 32b78aebf2
Migrate to IsControlledBy from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy 042b5642b9
Migrate to NewControllerRef from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy b28a83a4cf
Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
Klaus Ma ce826dcd78 Removed un-used InodePressure condition. 2017-08-04 11:29:51 +08:00
Chao Xu 97e07e5b52 Let controllers ignore initialization timeout error when creating a pod. 2017-08-03 15:28:08 -07:00
Klaus Ma c8ecd92269 Moved node condition check into Predicats. 2017-08-03 15:39:11 +08:00
dhilipkumars a1ba598130 Have a uniform format for filenames across controllers 2017-08-02 09:50:05 +05:30
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

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

**Which issue this PR fixes**: fixes #48975

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
jianglingxia 88828cc777 [trival] fix typo 2017-07-21 16:38:08 +08:00
Jacob Simpson b565f53822 update-bazel.sh 2017-07-17 15:06:08 -07:00
Chao Xu 9d489c8504 manual changes 2017-07-17 15:05:38 -07:00
Jacob Simpson a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Jacob Simpson 2c70e5df35 Manual changes. 2017-07-17 15:05:37 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Kubernetes Submit Queue 0a44e5b5c7 Merge pull request #47042 from gyliu513/event-count
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Validated expected event numbers for damoncontroller test.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
none
```
2017-07-12 14:08:04 -07:00
Guangya Liu 58dce96947 Validated expected event numbers for damoncontroller test. 2017-07-05 11:39:48 +08:00
Guangya Liu cb7d74c677 Factored out simulate from nodeShouldRunDaemonPod.
Addressed comments from https://github.com/kubernetes/kubernetes/pull/48189#issuecomment-312223162
2017-07-05 09:42:55 +08:00
Mike Danese 8e6c2ea4d0 support NoExecute and NoSchedule taints correctly in DaemonSet controller
And add some unit tests.
2017-06-29 10:16:36 +02:00
Mike Danese 1aede99aba fix #45780 slightly differently 2017-06-29 10:16:36 +02:00
Mike Danese d462b4cbc8 Partially revert "Do not fire InsufficientResourceError when there are intentional reasons."
This partially reverts commit 2b311fefba.
We drop the changes to the DaemonSet controller but leave the test. By
reverting the changes, we make it easier to return different values of
shouldContinueRunning for intentional predicate failures, rather then
lumping all intentional predicate failures together. The test should
continue to pass after the fix.
2017-06-29 10:16:36 +02:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Janet Kuo 25a67fc5cd Rename DaemonSet and StatefulSet hash label
Make them share the same hash label "controller-revision-hash", for
consistency
2017-06-15 18:04:27 -07:00
Janet Kuo 52a05d1632 Do not add unique label to DaemonSet 2017-06-13 17:04:27 -07:00
Janet Kuo f43060ea41 Construct history once and pass around in DaemonSet sync loop 2017-06-13 17:04:27 -07:00
Janet Kuo 0035d86248 Update adoption/release of DaemonSet controller history 2017-06-12 23:33:31 -07:00
Janet Kuo abf7a88c4c Wait for history store synced 2017-06-12 23:33:31 -07:00
Janet Kuo 2b8f91e549 Update kubectl rollout to consume `.data` of DaemonSet history
Also update tset data to make sure DaemonSet template is replaced, not
merged, when rolling back.
2017-06-10 10:52:33 -07:00
Janet Kuo f9070b6ace Change what is stored in DaemonSet history `.data`
In DaemonSet history `.data`, store a strategic merge patch that can be
applied to restore a DaemonSet. Only PodSpecTemplate is saved.
2017-06-10 10:52:33 -07:00
Guangya Liu 2b311fefba Do not fire InsufficientResourceError when there are intentional reasons. 2017-06-06 06:46:14 +08:00
Janet Kuo edabdac094 Implement kubectl rollout history and undo for DaemonSet 2017-06-03 17:10:57 -07:00
Janet Kuo 85ec49c9bb Verify histories and pods in DaemonSet e2e test 2017-06-03 00:46:11 -07:00
Janet Kuo d2cf00fcd6 Test both strategies in all daemonSet controller unit tests 2017-06-03 00:46:11 -07:00
Janet Kuo d02f40a5e7 Implement DaemonSet history logic in controller
1. Create controllerrevisions (history) and label pods with template
   hash for both RollingUpdate and OnDelete update strategy
2. Clean up old, non-live history based on revisionHistoryLimit
3. Remove duplicate controllerrevisions (the ones with the same template)
   and relabel their pods
4. Update RBAC to allow DaemonSet controller to manage
   controllerrevisions
5. In DaemonSet controller unit tests, create new pods with hash labels
2017-06-03 00:44:23 -07:00
Janet Kuo 4e6f70ff67 Autogen: run hack/update-all.sh 2017-06-03 00:43:53 -07:00
Kubernetes Submit Queue d8374eaae4 Merge pull request #46346 from zjj2wry/ds-controller
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

add test and fix typo in daemoncontroller

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-02 23:37:40 -07:00
Kubernetes Submit Queue 348bf1e032 Merge pull request #46627 from deads2k/api-12-labels
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

move labels to components which own the APIs

During the apimachinery split in 1.6, we accidentally moved several label APIs into apimachinery.  They don't belong there, since the individual APIs are not general machinery concerns, but instead are the concern of particular components: most commonly the kubelet.  This pull moves the labels into their owning components and out of API machinery.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @kubernetes/api-approvers 
@derekwaynecarr  since most of these are related to the kubelet
2017-06-02 23:37:38 -07:00
Kubernetes Submit Queue 9baeab9dd8 Merge pull request #46695 from gyliu513/daemoncontrollertest
Automatic merge from submit-queue (batch tested with PRs 46726, 41912, 46695, 46034, 46551)

Added a new test case for daemoncontroller.

This patch added a new test case of daemonSet with node selector,
matching some nodes, and launch pods on all the nodes.



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-02 21:42:39 -07:00
Kubernetes Submit Queue fb7674673f Merge pull request #45649 from k82cn/k8s_45628
Automatic merge from submit-queue

Checked node condition for DaemonSets when updating node.

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

**Release note**:

```release-note-none
```
2017-06-01 06:24:18 -07:00
Klaus Ma 75eb9b4434 Checked node condition for DaemonSets when updating node. 2017-06-01 08:40:43 +08:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Guangya Liu 3402443874 Added a new test case for daemoncontroller.
This patch added a new test case of daemonSet with node selector,
matching some nodes, and launch pods on all the nodes.
2017-05-31 17:14:02 +08:00
zhengjiajin 5468773b83 add test and fix typo in daemoncontroller 2017-05-26 18:26:18 +08:00
Kubernetes Submit Queue 8863bd4353 Merge pull request #45709 from YuPengZTE/devGetAllDaemonSetPods
Automatic merge from submit-queue (batch tested with PRs 45709, 41939)

delete err when return _

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-16 23:11:49 -07:00
yupengzte e463c28db6 delete err when return _
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-05-16 16:15:06 +08:00
zhangxiaoyu-zidif 00b67443f0 daemoncontroller.go:format for 2017-05-10 14:06:34 +08:00
gmarek f371c14314 Make Daemons tolerate NoExecute taints correctly 2017-05-04 15:25:03 +02:00
Łukasz Oleś 0f75e56722 Pods marked for deletion should be counted as unavailable 2017-04-18 22:32:59 +02:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Chao Xu d4850b6c2b move pkg/api/v1/helpers.go to subpackage 2017-04-14 14:25:11 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Andy Goldstein e63fcf708d Make controller Run methods consistent
- startup/shutdown logging
- wait for cache sync logging
- defer utilruntime.HandleCrash()
- wait for stop channel before exiting
2017-04-14 07:27:45 -04:00
FengyunPan 4ba7f7dc9e Record a warning type event
A warning type event should be recorded when failed to calculate
the number of expected pods.
And the same to daemoncontroller when failed to place pod.
2017-04-12 12:03:18 +08:00
Kubernetes Submit Queue e3e44b77ff Merge pull request #42964 from k82cn/update_defalt_toleration_sec
Automatic merge from submit-queue (batch tested with PRs 44084, 42964)

Updated AddOrUpdateTolerationInPod to return bool only.

Updated AddOrUpdateTolerationInPod to return bool only, as there's no case to generate error (the error was used for annotation, it'll not return error after moving to field); and also update admission & daemonset accordingly.
2017-04-05 20:45:20 -07:00
Kubernetes Submit Queue 7e6b8c19b9 Merge pull request #43302 from harryge00/fix-typo
Automatic merge from submit-queue

fix typos

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-24 10:27:18 -07:00
Michail Kargakis 68b78282d7 controller: work around milliseconds skew in AddAfter 2017-03-21 16:39:32 -04:00
haoyuan 2b85ca8e00 fix typos 2017-03-18 22:45:07 +08:00
Anthony Yeh b4b8fdbca3 GC: Fix re-adoption race when orphaning dependents.
The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).
2017-03-17 15:39:26 -07:00
Klaus Ma 3f24d46564 Removed err from return value of AddOrUpdateTolerationInPod. 2017-03-13 22:37:41 +08:00
Łukasz Oleś b32afe1720 kubectl: respect DaemonSet strategy parameters for rollout status
It handles "after-merge" comments from #41116
2017-03-09 20:02:52 +01:00
Anthony Yeh fac372d090 DaemonSet: Relist Pods before each phase of sync.
The design of DaemonSet requires a relist before each phase (manage,
update, status) because it does not short-circuit and requeue for each
action triggered.
2017-03-07 16:42:29 -08:00
Anthony Yeh 182753f841 DaemonSet: Check that ControllerRef UID matches. 2017-03-07 16:42:29 -08:00
Anthony Yeh 97c363a3e0 DaemonSet: Always set BlockOwnerDeletion in ControllerRef. 2017-03-07 16:42:29 -08:00
Anthony Yeh ab5a82d6e6 DaemonSet: Don't log Pod events unless some DaemonSet cares. 2017-03-07 16:42:29 -08:00
Anthony Yeh 1099811833 DaemonSet: Use ControllerRef to route watch events.
This is part of the completion of ControllerRef, as described here:

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#watches
2017-03-07 16:42:28 -08:00
Anthony Yeh 421e0bbd83 DaemonSet: Use ControllerRefManager to adopt/orphan. 2017-03-07 16:42:28 -08:00
Anthony Yeh 8f3a56f582 DaemonSet: Add ControllerRef on all created Pods. 2017-03-07 16:42:28 -08:00
Kubernetes Submit Queue 52f4d38069 Merge pull request #42370 from janetkuo/ds-e2e-ignore-no-schedule-taint
Automatic merge from submit-queue (batch tested with PRs 42456, 42457, 42414, 42480, 42370)

In DaemonSet e2e test, don't check nodes with NoSchedule taints

Fixes #42345 

For example, master node has a ismaster:NoSchedule taint. We don't expect pods to be created there without toleration. 

cc @marun @lukaszo @kargakis @yujuhong @Random-Liu @davidopp @kubernetes/sig-apps-pr-reviews
2017-03-04 00:17:47 -08:00
Janet Kuo 16b88e7e14 Add unit test for daemonset with network unavailable node 2017-03-02 16:04:40 -08:00
Janet Kuo 7bdf54a30a In DaemonSet e2e test, don't check nodes with NoSchedule taints 2017-03-02 16:04:39 -08:00
Łukasz Oleś 5dbb8e0d24 Enque DaemonSet sync when node taints changed
Fixes #42398
2017-03-02 16:35:43 +01:00
Janet Kuo 4c882477e9 Make DaemonSet respect critical pods annotation when scheduling 2017-02-27 09:59:45 -08:00
Łukasz Oleś 7d9c817db0 Generated part for DaemonSet updates 2017-02-27 09:17:34 +01:00
Łukasz Oleś b2d9f99f0c Moved tests and fixed typs 2017-02-27 09:15:56 +01:00
Łukasz Oleś 620310c12f Move TemplateGeneration to the Spec 2017-02-27 09:15:56 +01:00
Łukasz Oleś b27308c317 DaemonSet updates
It implements https://github.com/kubernetes/community/blob/master/contributors/design-proposals/daemonset-update.md
Feature https://github.com/kubernetes/features/issues/124
2017-02-27 09:15:56 +01:00
Kevin 53090e9867 make DaemonSets have infinite toleration for Unreachable/NotReady NoExecute Taints 2017-02-23 21:19:34 +08:00
Avesh Agarwal b4d3d24eaf Update tests. 2017-02-22 09:27:42 -05:00
Kubernetes Submit Queue b3a34af30f Merge pull request #41300 from kargakis/minor-fixes
Automatic merge from submit-queue (batch tested with PRs 41196, 41252, 41300, 39179, 41449)

controller: cleanup workload controllers a bit

* Switches glog.Errorf to utilruntime.HandleError in DS and RC controllers
* Drops a couple of unused variables in the DS, SS, and Deployment controllers
* Updates some comments

@kubernetes/sig-apps-misc
2017-02-15 04:14:14 -08:00
Janet Kuo b593427105 Enable PodTolerateNodeTaints predicate in DaemonSet controller 2017-02-13 12:52:02 -08:00
deads2k fd34b11e13 react to informer updates 2017-02-13 09:18:32 -05:00
deads2k a86fabb9d2 regenerate informers 2017-02-13 07:59:34 -05:00
Michail Kargakis 10b4ec7b47 controller: cleanup workload controllers a bit
* Switches glog.Errorf to utilruntime.HandleError in DS and RC controllers
* Drops a couple of unused variables in the DS, SS, and Deployment controllers
* Updates some comments
2017-02-12 17:52:28 +01:00
Kubernetes Submit Queue 9abfa6b446 Merge pull request #40385 from ncdc/shared-informers-02-swap-existing
Automatic merge from submit-queue

Replace hand-written informers with generated ones

Replace existing uses of hand-written informers with generated ones.
Follow-up commits will switch the use of one-off informers to shared
informers.

This is a precursor to #40097. That PR will switch one-off informers to shared informers for the majority of the code base (but not quite all of it...).

NOTE: this does create a second set of shared informers in the kube-controller-manager. This will be resolved back down to a single factory once #40097 is reviewed and merged.

There are a couple of places where I expanded the # of caches we wait for in the calls to `WaitForCacheSync` - please pay attention to those. I also added in a commented-out wait in the attach/detach controller. If @kubernetes/sig-storage-pr-reviews is ok with enabling the waiting, I'll do it (I'll just need to tweak an integration test slightly).

@deads2k @sttts @smarterclayton @liggitt @soltysh @timothysc @lavalamp @wojtek-t @gmarek @sjenning @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-06 16:25:42 -08:00
Andy Goldstein 70c6087600 Replace hand-written informers with generated ones
Replace existing uses of hand-written informers with generated ones.
 Follow-up commits will switch the use of one-off informers to shared
 informers.
2017-02-06 13:49:27 -05:00
Kubernetes Submit Queue d6f7ae2ffb Merge pull request #40840 from janetkuo/ds-owner-file
Automatic merge from submit-queue

Update daemon set controller OWNERS file

Adding myself as reviewer, adding @mikedanese as approver 
cc @kargakis @lukasredynk
2017-02-02 09:54:06 -08:00
Kubernetes Submit Queue 4ecd52b8ac Merge pull request #40720 from janetkuo/ds-event
Automatic merge from submit-queue (batch tested with PRs 40556, 40720)

Emit events on 'Failed' daemon pods

Follow up #40330 @erictune @mikedanese @kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-02-02 03:21:06 -08:00
Kubernetes Submit Queue 331a558cc4 Merge pull request #37617 from yarntime/fix_typo_in_daemon
Automatic merge from submit-queue (batch tested with PRs 37617, 40197)

fix typo in daemon

fix typo in daemon.
2017-02-01 20:46:37 -08:00
Janet Kuo c39517778d Update daemon controller OWNERS file 2017-02-01 18:31:26 -08:00
Janet Kuo f531bf205a Address comments 2017-02-01 11:37:48 -08:00
Janet Kuo 7074d2fd39 Emit events on 'Failed' daemon pods 2017-02-01 11:37:48 -08:00
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 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
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 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
Timothy St. Clair 52bedaf416 Decrease Daemonset burst replicas due to DoS conditions. 2017-01-27 13:34:11 -06:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
Janet Kuo 81c1e0c6ac Address comments 2017-01-25 10:31:16 -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
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
Clayton Coleman bcde05753b
Correct import statements 2017-01-17 16:18:18 -05:00
Clayton Coleman 660095776a
generated: staging 2017-01-17 16:17:20 -05:00