Commit Graph

6197 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
64939b66c6
Merge pull request #119146 from xuexu6666/xuexu6666/ControllerUtilUseCmpDiff
Use cmp diff in controller_util_test.go
2023-07-10 02:41:18 -07:00
Aldo Culquicondor
f7a1fb76f4
Only declare job as finished after removing all finalizers
Change-Id: Id4b01b0e6fabe24134e57e687356e0fc613cead4
2023-07-07 14:08:19 -04:00
xuexu6666
d7708e79d3 Use cmp diff 2023-07-06 23:01:06 -05:00
Heba Elayoty
2fe38f93e5
feat: Append job creation timestamp to cronjob annotations (#118137)
* Append job name to job annotations

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>

* Update annotation description, remove timezone, and fix time

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>

* Remove unused ctx

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>

* code review comments

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>

* code review comments

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>

* Add timezone back

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>

---------

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
2023-07-06 14:39:04 -07:00
Kubernetes Prow Robot
6f9d1d38d8
Merge pull request #118817 from pohly/dra-delete-claims
DRA: improve handling of completed pods
2023-07-06 10:15:15 -07:00
Kubernetes Prow Robot
7e5506de8d
Merge pull request #119111 from kannon92/remove-equal-ready-job
remove equalReady and replace with k8 util function
2023-07-06 09:13:16 -07:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
xin.li
6c0387d004 Migrated pkg/controller/endpoint to contextual logging
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-07-06 07:36:51 +08:00
xin.li
3cf2822bc5 Migrated pkg/controller/garbagecollector to contextual logging
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-07-06 07:36:51 +08:00
Kubernetes Prow Robot
916c3466b9
Merge pull request #118940 from soltysh/drop_missedschedules
Hide numberOfMissedSchedules as an algorithm internal number
2023-07-05 16:27:02 -07:00
kannon92
921b7e6e8f remove equalReady and replace with k8 util function 2023-07-05 20:11:48 +00:00
Kubernetes Prow Robot
91698fe900
Merge pull request #114061 from Octopusjust/k8s-pr15
testutil: use contextual logging
2023-07-05 08:38:57 -07:00
Maciej Szulik
1240a29af9
Hide numberOfMissedSchedules as an algorithm internal number 2023-07-05 16:58:28 +02:00
Patrick Ohly
a514f40131 dra resourceclaim controller: delete generated claims when pod is done
When a pod is done, but not getting removed yet for while, then a claim that
got generated for that pod can be deleted already. This then also triggers
deallocation.
2023-07-05 16:10:20 +02:00
Patrick Ohly
e8a0c42212 dra resourceclaim controller: remove reservation for completed pods
When a pod is known to never run (again), the reservation for it also can be
removed. This is relevant in particular for the job controller.
2023-07-05 16:10:20 +02:00
Patrick Ohly
7f5a02fc7e dra resourceclaim controller: enhance logging
Adding logging to event handlers makes it more obvious why (or why not) claims
and pods need to be processed.
2023-07-05 16:10:20 +02:00
Patrick Ohly
d1ba893ad8 dra resourceclaim controller: refactor isPodDone
This covers pods that get deleted before running and will be used more than
once soon.
2023-07-05 16:09:41 +02:00
Kubernetes Prow Robot
229dd79efd
Merge pull request #117865 from aleksandra-malinowska/parallel-sts-3
Parallel StatefulSet pod create & delete
2023-07-03 10:16:51 -07:00
Kubernetes Prow Robot
0a82bdbfdb
Merge pull request #118173 from huiwq1990/feat-autoscale-variable
hpa: cleanup `currentReplicas` code
2023-07-02 23:00:50 -07:00
Kubernetes Prow Robot
ec87834bae
Merge pull request #118936 from pohly/dra-deallocate-when-unused
DRA: for delayed allocation, deallocate when no longer used
2023-07-01 12:56:48 -07:00
Kubernetes Prow Robot
52b1247b28
Merge pull request #118232 from luckymrwang/style
style: correct the sentence
2023-06-30 01:51:59 -07:00
Kubernetes Prow Robot
9af93df9b0
Merge pull request #117845 from ctripcloud/fix-hpa-plain-calc
fix HPA plain metric calculate
2023-06-30 01:51:47 -07:00
Kubernetes Prow Robot
68b9ccc511
Merge pull request #117554 from yanggangtony/clean-endpoint-controller
clean endpoint controller typo logs
2023-06-29 16:23:44 -07:00
Patrick Ohly
1b47e6433b dra delayed allocation: deallocate when a pod is done
This releases the underlying resource sooner and ensures that another consumer
can get scheduled without being influenced by a decision that was made for the
previous consumer.

An alternative would have been to have the apiserver trigger the deallocation
whenever it sees the `status.reservedFor` getting reduced to zero. But that
then also triggers deallocation when kube-scheduler removes the last
reservation after a failed scheduling cycle. In that case we want to keep the
claim allocated and let the kube-scheduler decide on a case-by-case basis which
claim should get deallocated.
2023-06-29 09:47:30 +02:00
Aleksandra Malinowska
d616cf72a3 Add unit tests for parallel StatefulSet create & delete 2023-06-28 16:55:38 +02:00
Kubernetes Prow Robot
74bd77a9df
Merge pull request #118917 from kmala/daemonsetfix
increase the log level for the GetTargetNodeName error message
2023-06-28 00:08:32 -07:00
Kubernetes Prow Robot
960830bc66
Merge pull request #118102 from RomanBednar/retro-sc-assignment-ga
graduate RetroactiveDefaultStorageClass feature to GA in 1.28
2023-06-27 20:46:32 -07:00
yanggang
860aab842d
fix a reference to the wrong variable name
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-06-28 06:12:44 +08:00
Aldo Culquicondor
a4519665fe
Skip terminal Pods with a deletion timestamp from the Daemonset sync (#118716)
* Skip terminal Pods with a deletion timestamp from the Daemonset sync

Change-Id: I64a347a87c02ee2bd48be10e6fff380c8c81f742

* Review comments and fix integration test

Change-Id: I3eb5ec62bce8b4b150726a1e9b2b517c4e993713

* Include deleted terminal pods in history

Change-Id: I8b921157e6be1c809dd59f8035ec259ea4d96301
2023-06-27 08:56:33 -07:00
Maciej Szulik
af1c9e49c4
Update schedule logic to properly calculate missed schedules
Before this change we've assumed a constant time between schedule runs,
which is not true for cases like "30 6-16/4 * * 1-5".
The fix is to calculate the potential next run using the fixed schedule
as the baseline, and then go back one schedule back and allow the cron
library to calculate the correct time.

This approach saves us from iterating multiple times between last
schedule time and now, if the cronjob for any reason wasn't running for
significant amount of time.
2023-06-27 11:29:30 +02:00
Keerthan Reddy Mala
0033f65808 increase the log level for the GetTargetNodeName error message 2023-06-26 17:31:50 -07:00
Kubernetes Prow Robot
a48bcc06fe
Merge pull request #117064 from RomanBednar/multiple-defaults
storage class assignment should not ignore errors
2023-06-23 03:09:23 -07:00
Kubernetes Prow Robot
9325a57125
Merge pull request #118765 from mimowo/job-controller-unit-tests
Do not set jm.syncJobBatchPeriod=0 if not needed
2023-06-22 10:25:41 -07:00
Michal Wozniak
8ed23558b4 Do not set jm.syncJobBatchPeriod=0 if not needed 2023-06-22 11:10:53 +02:00
Kubernetes Prow Robot
28296ba59e
Merge pull request #113994 from mengjiao-liu/contextual-logging-controller-certificates
certificate controller: use contextual logging
2023-06-21 09:03:42 -07:00
Roman Bednar
1bd3f072fa stop ignoring storage class selection errors
The GetDefaultClass() was fixed in scope of this issue:
https://github.com/kubernetes/kubernetes/issues/110514

Before this change assignDefaultStorageClass() was ignoring errors from
this function since it could mean there are multiple defaults - assign
could safely continue and do nothing.

This is no longer true because we always choose one from multiple
defaults - any errors returned from GetDefaultClass() are real errors
and should not be ignored.
2023-06-21 13:09:05 +02:00
Aleksandra Malinowska
63e5b6bdb2 Parallel StatefulSet pod create & delete 2023-06-20 12:15:21 +02:00
Aleksandra Malinowska
2fb472c83c Refactor StatefulSet controller update logic 2023-06-20 12:14:25 +02:00
Michal Wozniak
784a309b91 Do not error in Job controller sync when there are pod failures 2023-06-20 11:31:24 +02:00
Aldo Culquicondor
c9b01dd977
Fix race in logging expectations
Change-Id: I27da7cae741935da6f0815639a54bfd597a2a6c6
2023-06-19 13:26:39 -04:00
ialidzhikov
958c8fb695 Make use of k8s.io/utils/pointer.Duration
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2023-06-18 21:46:26 +03:00
Michal Wozniak
74c5ff97f1 Lower the constants for the rate limiter in Job controller 2023-06-16 17:00:04 +02:00
Michal Wozniak
c51a422d78 Cleanup job controller handling of backoff 2023-06-16 14:53:27 +02:00
Kubernetes Prow Robot
58d7a794d2
Merge pull request #113504 from pacoxu/taint-unit-test
AddOrUpdateTaintOnNode: if node does not exists, return an error
2023-06-15 17:48:19 -07:00
Kubernetes Prow Robot
47e79b8156
Merge pull request #116910 from fatsheep9146/job-controller-contextual-logging
Migrated pkg/controller/job to contextual logging
2023-06-14 08:00:18 -07:00
Ziqi Zhao
7bc449d7e0 add contextual logging to job-controller
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-06-14 13:40:02 +08:00
carlory
5e048041e4 remove helper function for unused storage feature in pkg/proxy/util 2023-06-13 09:22:59 +08:00
Kubernetes Prow Robot
8a0b1bbf24
Merge pull request #118095 from carlory/patch-002
remove unused pv informer from expand_controller
2023-06-12 11:43:58 -07:00
Kubernetes Prow Robot
a5332a839d
Merge pull request #118470 from mimowo/job-controller-fix-delay
Ensure Job sync invocations are batched by 1s periods
2023-06-07 12:02:13 -07:00
Michal Wozniak
2f6b1d3c0f Ensure Job sync invocations are batched by 1s periods 2023-06-07 17:32:46 +02:00