Commit Graph

71 Commits (49e72d60495e93f93b22dc93104eb5709cd7c403)

Author SHA1 Message Date
Krzysztof Jastrzebski 319930fe97 Delete only unscheduled pods if node doesn't exist anymore. 2019-04-08 19:31:57 +02:00
Krzysztof Jastrzebski 0087af78e2 Deleting pods assigned to not existing nodes only if
ScheduleDaemonSetPods is enabled.
2019-01-31 20:34:51 +01:00
Krzysztof Jastrzebski 7186d3ba8b Delete pods assigned to not existing nodes. 2019-01-28 14:38:09 +01:00
Andrew Kim 0bc5508aca replace client-go/util/integer with k8s.io/utils/integer 2019-01-24 15:34:21 -05:00
Kubernetes Prow Robot 3caa7ada69
Merge pull request #65469 from k82cn/k8s_64857
Set .spec.schedulerName to ds-controller.
2019-01-07 08:35:42 -08:00
wangqingcan b82a1d4600 Move predicate types from algorithm to predicates 2018-12-21 22:26:47 +08:00
yuexiao-wang f3353c358d [scheduler cleanup phase 2]: Rename to
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:21:12 +08:00
Wei Huang ad6e3617d3
update logic of adding default DS pod tolerations
- update DS pod default tolerations: add PIDPressure, remove OutOfDisk
- remove useless tolerations testcases
2018-11-29 01:18:32 -08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
k8s-ci-robot bc85713882
Merge pull request #67251 from tnozicka/fix-ds-observedgeneration
Don't raise observedGeneration when waiting for expectations and object hasn't been processed
2018-10-30 12:22:28 -07:00
k8s-ci-robot 836ce7357a
Merge pull request #67914 from Huang-Wei/inconsistent-dscontroller-comment
fix a comment inconsistency in Daemonset Controller
2018-09-24 17:16:50 -07:00
Da K. Ma 55199a04be Added default tolerations for new pods.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-09-11 09:14:41 +08:00
Da K. Ma e39b510726 Added unschedulable and network-unavailable toleration.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-09-07 16:53:49 +08:00
Wei Huang 8f93a93281
fix a comment inconsistency in Daemonset Controller 2018-08-27 16:28:25 -07:00
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
Tomas Nozicka 0c098bc632 Don't raise observedGeneration when waiting for expectations and object
hasn't been processed
2018-08-10 12:28:34 +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
Da K. Ma 786d48d6e8 Set .spec.schedulerName to ds-controller.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-07-20 04:16:19 +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