Commit Graph

392 Commits (2bd14ea60e934f0d7a499a1a830a05262238605a)

Author SHA1 Message Date
k8s-ci-robot 79e5cb2cb7
Merge pull request #71302 from liggitt/verify-unit-test-feature-gates
Split mutable and read-only access to feature gates, limit tests to readonly access
2018-11-29 21:45: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
k8s-ci-robot 0b78c0b45a
Merge pull request #67927 from k82cn/ds_approver
Volunteer to be DaemonSet controller maintainer.
2018-11-28 21:44:18 -08:00
Jordan Liggitt 2498ca7606 drop VerifyFeatureGatesUnchanged 2018-11-21 11:51:33 -05:00
Jordan Liggitt 4dca07ef7e Fixup incorrect use of DefaultFeatureGate.Set in tests 2018-11-21 11:51:33 -05:00
Jordan Liggitt 733dd9dfd7 Add tests to ensure feature gate changes don't escape kubelet/scheduler packages 2018-11-16 10:52:53 -05:00
Jordan Liggitt de8bf9b63d fix scheduler and kubelet unit tests leaking feature flag changes 2018-11-16 10:52:53 -05: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 e77e8ffbf5
Merge pull request #69730 from xichengliudui/fix18101204
Fix some typo
2018-10-22 23:59:24 -07:00
xichengliudui ef496320cf Remove excess 'in'
Fix some typo

Fix some typo
2018-10-13 09:12:42 -04:00
tanshanshan b7c7966b9f Move pkg/scheduler/algorithm/well_known_labels.go out 2018-10-13 09:10:00 +08:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -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
k8s-ci-robot 5be0a0ee8d
Merge pull request #67899 from ravisantoshgudimetla/ScheduleDaemonSetPods-beta
Graduate Schedule daemon set pods  by default scheduler to beta and fix tests
2018-09-12 13:18:23 -07:00
ravisantoshgudimetla b2e92f1ba2 Fix test cases and build files 2018-09-12 14:19:29 -04: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
Klaus Ma 5713d96f36 Volunteer to be DaemonSet controller maintainer.
Signed-off-by: Klaus Ma <klaus1982.cn@gmail.com>
2018-08-28 14:20:12 +08:00
Wei Huang 8f93a93281
fix a comment inconsistency in Daemonset Controller 2018-08-27 16:28:25 -07:00
Davanum Srinivas 9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04: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
Kubernetes Submit Queue ccef02e04f
Merge pull request #67461 from janetkuo/ds-collision-count
Automatic merge from submit-queue (batch tested with PRs 67461, 67464, 67416). 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>.

Avoid unnecessary DaemonSet collisionCount bump

**What this PR does / why we need it**: Sometimes DaemonSet controller will bump its collisionCount more than necessary when the collisionCount of the DaemonSet in the cache store hasn't been updated. This won't affect users, as collisionCount is only used for creating unique hash and the number doesn't matter as long as it changes. This fix avoids the unnecessary collisionCount updates and de-flakes the DaemonSet test for collisionCount. 

**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 #67273

**Special notes for your reviewer**: @kubernetes/sig-apps-pr-reviews 

**Release note**:

```release-note
NONE
```
2018-08-15 20:09:05 -07:00
Janet Kuo fd7a694440 Avoid unnecessary DaemonSet collisionCount bump 2018-08-15 16:16:41 -07:00
Tomas Nozicka b0b1629e8d Update Bazel 2018-08-15 16:03:42 +02: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
Janet Kuo 1fca77dc12 Update workloads controller owner files 2018-08-14 14:20:34 -07: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
Morten Torkildsen a93ea43e15 Fix to handle hash collisions correctly for DaemonSet 2018-08-08 13:43:43 -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
Kubernetes Submit Queue 0a284c1cde
Merge pull request #66082 from sjenning/fix-is-critical-checks
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>.

move feature gate checks inside IsCriticalPod

Currently `IsCriticalPod()` calls throughout the code are protected by `utilfeature.DefaultFeatureGate.Enabled(features.ExperimentalCriticalPodAnnotation)`.

However, with Pod Priority, this gate could be disabled which skips the priority check inside IsCriticalPod().

This PR moves the feature gate checking inside `IsCriticalPod()` and handles both situations properly.

@aveshagarwal @ravisantoshgudimetla @derekwaynecarr 
/sig node
/sig scheduling
/king bug
2018-08-01 11:47:08 -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
Janet Kuo 666a41c2ea Safe encode template hash value to make it consistent with resource name 2018-07-13 09:52:26 -07:00
Seth Jennings f2a7654978 move feature gate checks inside IsCriticalPod 2018-07-11 16:10:05 -05:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Kubernetes Submit Queue 65819a8f92
Merge pull request #63744 from krmayankk/changelog
Automatic merge from submit-queue (batch tested with PRs 63580, 63744, 64541, 64502, 64100). 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 redundant getKey functions from controller tests

```release-note
None
```
2018-06-20 01:27:32 -07: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
Da K. Ma faaa485b35 Updated helper funcs to use nodename. 2018-06-02 08:38:58 +08:00
Guoliang Wang 761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Mayank Kumar a1cd3a4bcc remove redundant getKey functions from tests 2018-05-30 22:15:06 -07: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
David Eads 94e3d94d67 update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
David Eads a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00