Commit Graph

139 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
186f934e4c
Merge pull request #98346 from mortent/checkForScalePDBs
Check if resources implement scale in disruption controller
2021-02-22 13:58:03 -08:00
Morten Torkildsen
b63342af70 Fix nil pointer dereference in disruption controller 2021-02-03 21:04:29 -08:00
Morten Torkildsen
96ea28aa77 Check if resources implement scale in disruption controller 2021-02-03 20:19:35 -08:00
Kubernetes Prow Robot
0ee9c391f1
Merge pull request #92827 from yuanhuaiwang/disruptionresync
Remove resync period for disruption controller
2020-12-08 16:28:26 -08:00
Renato Viana
316eff8dee Fixed percentage behavior in instr
fixed syntax, wrote a test

fixed a test

.

1

Update staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

Co-Authored-By: Joel Speed <Joel.speed@hotmail.co.uk>

added test

.

fix

fix test

fixed a test

gofmt

lint

fix

function name

validation fix

.

godocs added

.
2020-09-30 21:23:05 +01:00
yuanhuaiwang
8e1e1e9be2
Remove resync period for disruption controller
What type of PR is this?
/kind cleanup

What this PR does / why we need it:
The disruption controller is resyncing all ssets every 30 seconds, this is not necessary, and make the depth of disruption workqueue longer and can cause delays processing actual updates when large amounts of disruptions exist.

Special notes for your reviewer:

Does this PR introduce a user-facing change?
Disruption controllers no longer force a resync every 30 seconds when nothing has changed.
2020-07-06 20:31:28 +08:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
drfish
251706ceb4 Continue label is no more needed for countHealthyPods() 2020-03-28 09:57:25 +08:00
Kubernetes Prow Robot
179fe40d06
Merge pull request #88599 from julianvmodesto/scale-ctx-opts
Add context and options to scale client
2020-03-06 13:17:08 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Julian V. Modesto
da3c3432d8 Add context and options to scale client 2020-03-02 00:03:26 -05:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
yiyang5055
53aff819e0 fix static check failure in pkg/controller/disruption and pkg/controller/namespace/deletion 2020-01-20 09:10:46 +00:00
Nan Yu
1fb0dd4ec5 Rename PodDisruptionsAllowed to DisruptionsAllowed in type PodDisruptionBudgetStatus 2019-12-03 14:26:35 -08:00
hwdef
38256df718 pkg/controller: fix staticcheck warning 2019-11-07 16:46:47 +08:00
Kubernetes Prow Robot
65fa4c979a
Merge pull request #82152 from misterikkit/disruption
Fix retry logic in DisruptionController
2019-10-23 12:48:58 -07:00
zouyee
65ddf102ef add tombstoones handle for pdb
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-15 22:02:18 +08:00
Jonathan Basseri
c8d937c5f1 Add unit test for DisruptionController retry logic
This tests the PDB status update path in DisruptionController and
asserts that conflicting writes (with eviciton handler) are handled
gracefully.

This adds the client-go fake.Clientset into our tests, because that is
the layer required for injecting update failures.

This also adds a TestMain so that DisruptionController logs can be
enabled during test. e.g.,

    go test ./pkg/controller/disruption -v -args -v=4
2019-09-03 16:52:45 -07:00
Jonathan Basseri
8835f6bb00 Fix retry logic in DisruptionController
This changes the retry logic in DisruptionController so that it
reconciles update conflicts. In the old behavior, any pdb status update
failure was retried with the same status, regardless of error.

Now there is no retry logic with the status update. The error is passed
up the stack where the PDB can be requeued for processing.

If the PDB status update error is a conflict error, there are some new
special cases:
- failSafe is not triggered, since this is considered a retryable error
- the PDB is requeued immediately (ignoring the rate limiter) because we
  assume that conflict can be resolved by getting the latest version
2019-08-30 16:02:09 -07:00
Kubernetes Prow Robot
927f45191e
Merge pull request #81527 from yastij/move-controller-util
move WaitForCacheSync to the sharedInformer package
2019-08-27 00:52:54 -07:00
Davanum Srinivas
4e4c38bbbe
Drop Azure/go-autorest from pkg/controller 2019-08-22 17:34:50 -04:00
Yassine TIJANI
7e4c3096fe move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-22 16:13:41 +01:00
Morten Torkildsen
f1883c9e8c Support scale subresource for PDBs (#76294)
* Support scale subresource for PDBs

* Check group in finder functions

* Small fixes and more tests
2019-05-23 22:24:17 -07:00
Kenneth Owens
f81fc8ae1b Updates OWNERS files and OWNERS_ALIASES for SIG Apps to make reviewers
and approvers more clear
2019-04-16 11:35:21 -07:00
Kubernetes Prow Robot
65dc445aa2
Merge pull request #74241 from snowplayfire/fix-pdb-update
fix too many pdb update operations when nothing change
2019-04-08 18:53:03 -07:00
jingxueli
dfa3353390 fix pdb update too many when nothing change 2019-04-08 11:27:42 +08:00
Kubernetes Prow Robot
9fcbf02dca
Merge pull request #74044 from danielqsj/dr
fix the disruption-recheck metrics register error
2019-02-21 20:51:01 -08:00
danielqsj
687d759e36 fix more metrics rergister errors 2019-02-22 10:20:09 +08:00
Kubernetes Prow Robot
808f2cf0ef
Merge pull request #72525 from justinsb/owners_should_not_be_executable
Remove executable file permission from OWNERS files
2019-02-14 23:55:45 -08:00
danielqsj
23be9587a0 fix the disruption-recheck metrics register error 2019-02-14 09:15:44 +08:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Kubernetes Prow Robot
15ae6ec140
Merge pull request #68114 from houjun41544/20180831-disruption
Add unit test case for controller/disruption
2019-02-02 00:37:25 -08:00
Justin SB
dd19b923b7
Remove executable file permission from OWNERS files 2019-01-11 16:42:59 -08:00
hchiramm
e3fd0b6936 Remove unwanted else block from code.
Signed-off-by: hchiramm <hchiramm@redhat.com>
2019-01-11 16:46:39 +05:30
Jordan Liggitt
0ff455e340 generated files 2018-12-19 11:19:12 -05:00
Weibin Lin
842bd1e1ec update deployment, daemonset, replicaset, statefulset to apps/v1 2018-12-19 10:46:45 -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
b62c0fded3
Merge pull request #68048 from AdamDang/patch-17
Correct some errors in returned message
2018-10-30 13:44:40 -07:00
AdamDang
dc2c003457 Correct some errors in returned message
Update stateful_set.go

Update azure_vmss.go

Update azure_vmss.go

Update disruption.go

Update stateful_set.go
2018-10-30 09:53:02 +08:00
Guoliang Wang
b1ac6df4dc remove unused code of (pkg/controller) 2018-10-09 08:15:30 +08:00
houjun
0ed234dbff Add unit test case for controller/disruption 2018-08-31 14:12:18 +08: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
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -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
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