Commit Graph

55 Commits (344b9154847f1c7dce1e380170fce9b90fe40066)

Author SHA1 Message Date
Kubernetes Submit Queue 5d8a79f2e1
Merge pull request #67337 from linyouchong/pr-0813-issue67225
Automatic merge from submit-queue (batch tested with PRs 67493, 67617, 67582, 67337). 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 bug:DaemonSet didn't create pod after node have enough resource

**What this PR does / why we need it**:
Fix bug:DaemonSet didn't create pod after node have enough resource

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

**Special notes for your reviewer**:
NONE

**Release note**:
```release-note
DaemonSet: Fix bug- daemonset didn't create pod after node have enough resource
```
2018-08-20 20:39:17 -07:00
linyouchong c42439c676 Fix bug:DaemonSet didn't create pod after node have enough resource 2018-08-18 16:15:15 +08:00
Tomas Nozicka 63656da296 Add backoff for DS's pod deletion to limit fighting with kubelet failing the pod repeatedly 2018-08-15 16:03:39 +02:00
Wei Huang deb6d85470
ensure ScheduleDSPods respects tainted nodes
- add PodToleratesNodeTaints to nodeSelectionPredicates()
- add integration testcases
2018-08-09 18:01:51 -07:00
Kubernetes Submit Queue 0c8fe56ea4
Merge pull request #66484 from k82cn/rm_unused_funcs
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>.

Removed unused functions.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>

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

**Special notes for your reviewer**:

**Release note**:
```release-note
None
```
2018-08-03 12:40:35 -07:00
Da K. Ma a56121c191 Removed unused functions.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-07-22 20:56:53 +08:00
Seth Jennings f2a7654978 move feature gate checks inside IsCriticalPod 2018-07-11 16:10:05 -05:00
Michal Fojtik 6517e250cd
daemon: add custom node indexer 2018-06-12 11:10:10 +02:00
Kubernetes Submit Queue e6f64d0a79
Merge pull request #64916 from mfojtik/ds-01-improve-mem-usage
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

improve memory footprint of daemonset simulate

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

This is an alternative for https://github.com/kubernetes/kubernetes/pull/64915 (it might be not needed if that PR will merge)

During memory profiling of OpenShift, we noticed a significant amount of object allocations done by `IsControlledBy()`. @sttts found that the `GetObjectReferences()` method is doing a deep-copy of the object references. 

![screen shot 2018-06-08 at 14 22 59](https://user-images.githubusercontent.com/44136/41157922-7af953f2-6b27-11e8-9a16-bda8c3edfe07.png)

This PR simplify the `IsControlledBy()` to just iterate over the ownerRefs, without copying them. 

**Release note**:

```release-note
NONE
```
2018-06-11 08:56:20 -07:00
Michal Fojtik 60ef68c87d
improve memory footprint of daemonset simulate 2018-06-08 19:59:12 +02:00
Janet Kuo f621b1fc44 Skip updating status for DaemonSet being deleted 2018-06-05 17:03:54 -07:00
Kubernetes Submit Queue a0a4cc73db
Merge pull request #63223 from k82cn/kep548_working
Automatic merge from submit-queue (batch tested with PRs 64057, 63223, 64346, 64562, 64408). 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>.

Schedule DaemonSet Pods in scheduler.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
`ScheduleDaemonSetPods` is an alpha feature (since v1.11) that causes DaemonSet Pods
to be scheduler by default scheduler, instead of Daemonset controller. When it is enabled,
the `NodeAffinity` term (instead of `.spec.nodeName`) is added to the DaemonSet Pods;
this enables the default scheduler to bind the Pod to the target host. If node affinity
of DaemonSet Pod already exists, it will be replaced.

DaemonSet controller will only perform these operations when creating DaemonSet Pods;
and those operations will only modify the Pods of DaemonSet, no changes are made to the
`.spec.template` of DaemonSet.
```
2018-06-02 02:10:08 -07:00
Da K. Ma 8180e1e60f Eanbled schedule DaemonSet Pods by default scheduler. 2018-06-02 08:39:13 +08:00
Guoliang Wang 761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Kubernetes Submit Queue 7eb88f11d2
Merge pull request #59727 from wgliang/master.time
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>.

should use time.Since instead of time.Now().Sub

**What this PR does / why we need it**:
should use time.Since instead of time.Now().Sub

**Special notes for your reviewer**:
2018-05-10 20:29:40 -07:00
Da K. Ma a46486e586 Moved sync pod on Node logic to func.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-04-12 09:31:31 +08:00
Wang Guoliang 89669283fe should use time.Since instead of time.Now().Sub 2018-04-10 12:05:51 +08:00
Mikhail Mazurskiy 468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Jordan Liggitt 05e4ccecb1
disable DaemonSet scheduling feature for 1.10 2018-03-20 10:50:37 -04:00
Da K. Ma b23db30765 Added unscheduable taint.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-03-16 09:13:08 +08:00
Da K. Ma 5adb2bad45 Task 2: Schedule DaemonSet Pods by default scheduler.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-03-08 17:36:49 +08:00
Kenneth Owens f52e7ef4bf Update the DaemonSet controller to use the apps/v1 API 2018-02-22 11:38:54 -08:00
dmathieu dadce343be fix golint warnings in daemon controller
The only on remaining asks to rename DaemonSetsController, which is a
public interface and would need proper deprecation first.
2018-02-06 13:51:34 +01:00
Jonathan Basseri 30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kubernetes Submit Queue a701a42a82
Merge pull request #49763 from supereagle/versioned-group-clients
Automatic merge from submit-queue (batch tested with PRs 55331, 55272, 55228, 49763, 55242). 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>.

use versiond group clients from client-go

**What this PR does / why we need it**:
Some **Deprecated** group clients are still used, replace them with versioned group clients.

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

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

**Release note**:
```release-note
NONE
```
2017-11-08 17:13:27 -08:00
supereagle b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Ferran Rodenas d67898b875 Check RegisterMetricAndTrackRateLimiterUsage error when starting controllers
Signed-off-by: Ferran Rodenas <rodenasf@vmware.com>
2017-11-01 12:46:07 +01:00
Kubernetes Submit Queue 3c6ff87fa5
Merge pull request #52192 from liyinan926/ds-tests
Automatic merge from submit-queue (batch tested with PRs 54774, 54820, 52192, 54827). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Initial integration test setup for DaemonSet controller

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

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

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

**Release note**:
```release-note
NONE
```
2017-10-31 13:22:20 -07:00
Yinan Li 4dc42d078b Initial integration test setup for DaemonSet controller 2017-10-31 10:53:30 -07:00
Kevin 4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08: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
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
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
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
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
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
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
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 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
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
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