Commit Graph

96 Commits

Author SHA1 Message Date
Michal Wozniak
52cd6755eb Add pod disruption conditions for kubelet initiated failures 2022-11-07 11:23:22 +01:00
Michal Wozniak
fea883687f SSA to add pod failure conditions - ready for review 2022-10-27 18:21:33 +02:00
Aldo Culquicondor
4188d9b646 Add worker to clean up stale DisruptionTarget condition
Change-Id: I907fbdf01e7ff08d823fb23aa168ff271d8ff1ee
2022-08-02 11:25:01 -04:00
Aldo Culquicondor
dad8454ebb Add clock interface to disruption controller
To be able to write more precise unit tests in the future

Change-Id: I8f45947dfacca501acd856849bd978fad0f735cd
2022-08-02 11:17:29 -04:00
Kubernetes Prow Robot
375fd32b9f
Merge pull request #109957 from adammw/adammw/disruption-implements-scale
disruptioncontroller: check for scale subresource correctly
2022-06-21 08:00:26 -07:00
Adam Malcontenti-Wilson
af3594dfa5 disruptioncontroller: check for scale subresource correctly 2022-06-15 08:52:47 +10:00
Wojciech Tyczyński
783da34f54 Clean shutdown of disruption integration tests 2022-06-02 21:02:04 +02:00
ravisantoshgudimetla
65ff81757d Wire contexts to Disruption controllers 2022-02-04 10:32:04 -05:00
ravisantoshgudimetla
2c116055f7 [disruptioncontroller] Don't error for unmanaged pods
As of now, we allow PDBs to be applied to pods via
selectors, so there can be unmanaged pods(pods that
don't have backing controllers) but still have PDBs associated.
Such pods are to be logged instead of immediately throwing
a sync error. This ensures disruption controller is
not frequently updating the status subresource and thus
preventing excessive and expensive writes to etcd.
2021-07-07 10:42:24 -04:00
Morten Torkildsen
21fba79d45 Promote PDBs to GA 2021-03-09 10:29:11 -05:00
Morten Torkildsen
1e2a7f381f Add conditions to PDB status 2021-03-04 18:52:02 -08:00
Morten Torkildsen
5ad4280c09 Avoid sending events for every non-conformant pod in disruption controller 2021-02-28 19:43:25 -08:00
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
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
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
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
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
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
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
danielqsj
23be9587a0 fix the disruption-recheck metrics register error 2019-02-14 09:15:44 +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
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
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
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
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
supereagle
b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Dr. Stefan Schimanski
1d053c4f7c controllers: simplify deepcopy calls 2017-08-29 19:21:24 +02:00
Mayank Kumar
de3f09780b simplify disruption controller 2017-08-14 00:40:53 -07:00
Mikhail Mazurskiy
b28a83a4cf
Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
supereagle
adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
Jacob Simpson
a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07: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