Commit Graph

6254 Commits

Author SHA1 Message Date
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
Daniel Vega-Myhre
3a02ecb341 check test case param instead of feature flag in unit test code 2023-07-06 17:30:40 +00: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
Daniel Vega-Myhre
a647f9febb default enabled pod index for test cases, add test case disabling it 2023-07-05 18:47:45 +00:00
carlory
322da7c1aa fix gc metrics 2023-07-06 02:06:03 +08: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
Daniel Vega-Myhre
e0af0a5a45 add test case param for feature flag 2023-06-29 21:51:15 +00: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
Daniel Vega-Myhre
a9afaa1eee add feature gate 2023-06-27 18:07:17 +00: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
Daniel Vega-Myhre
2176053415 add completion index as pod label 2023-06-26 19:53:14 +00: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
xin.li
325205efb7 Migrated pkg/controller/endpoint to contextual logging
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-06-11 20:12:07 +08: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
Kubernetes Prow Robot
3fbf67a403
Merge pull request #116732 from czybjtu/cleanup_map_to_sets
Cleanup: use Set instead of map in endpointSlice utils
2023-06-07 07:38:13 -07:00
Roman Bednar
ac15d69757 remove RetroactiveDefaultStorageClass feature gate checks 2023-06-07 14:31:16 +02:00
Roman Bednar
6afb363ca1 test: remove RetroactiveDefaultStorageClass feature gate
Since the feature is GA and locked to true, tests can no longer set it
to false. Cleaning up by removing all references to this feature gate
from tests.

Feature gate will be removed in v1.29.
2023-06-07 14:31:16 +02:00
Michal Wozniak
71ab7dc791 Remarks 2023-06-05 10:48:32 +02:00
Michal Wozniak
70d3bb43e5 Adjust the algorithm for computing the pod finish time
Change-Id: Ic282a57169cab8dc498574f08b081914218a1039
2023-06-05 10:06:56 +02:00
ZhangYu
f9ae3e774d testutil: use contextual logging 2023-05-30 10:07:04 +08:00
Kubernetes Prow Robot
c35a2775b2
Merge pull request #115554 from yt2985/cleanSA
LegacyServiceAccountTokenCleanUp alpha
2023-05-26 08:54:53 -07:00
Kubernetes Prow Robot
1c9f08a1c5
Merge pull request #118262 from torredil/pv-controller
Improve Clarity of Provisioner Waiting Message
2023-05-26 07:57:04 -07:00
Kubernetes Prow Robot
a874f587b4
Merge pull request #118071 from kerthcet/cleanup/use-contextual-logging-in-statefulset
Chore: Apply to use contextual logging for all loggers in statefulSet
2023-05-26 07:56:53 -07:00
torredil
5d18f47149
Improve clarity and guidance in provisioner waiting message
Signed-off-by: torredil <torredil@amazon.com>
2023-05-25 17:26:06 +00:00
tinatingyu
133eff3df4 implement LegacyServiceAccountTokenCleanUp alpha 2023-05-24 23:20:17 +00:00
Cookie Wang
e2ed8f8c3c style: correct the sentence 2023-05-24 20:24:36 +08:00
guangli.bao
931cc96b8d remote windows condition when #116693 is merged
Signed-off-by: guangli.bao <guangli.bao@daocloud.io>
2023-05-24 14:54:22 +08:00
Kubernetes Prow Robot
484645e817
Merge pull request #116659 from claudiubelu/skip-flaky-tests-2
unit tests: Skip flaky tests on Windows (part 2)
2023-05-23 20:04:48 -07:00
huiwq1990
048938f1d8 hpa: cleanup currentReplicas code
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2023-05-22 20:37:49 +08:00
Michal Wozniak
0fe27a06f9 Cleanup the Job controller handling of terminating pods 2023-05-19 09:52:08 +02:00
kerthcet
3f1d8e7aeb Apply to use contextual logging for all loggers in statefulSet
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-05-18 16:55:19 +08:00
carlory
bea71a3e4e remove unused pv informer from expand_controller 2023-05-18 15:58:38 +08:00
Joe Betz
f0f92853ad Add api-machinery TL owners permissions for jpbetz 2023-05-15 11:09:54 -04:00
Kubernetes Prow Robot
8479db5876
Merge pull request #117946 from lavalamp/lavalamp-taking-a-break
lavalamp is taking a long break
2023-05-12 14:34:47 -07:00
Kubernetes Prow Robot
02659772cb
Merge pull request #117931 from tklauser/cidrset-rm-getindexforcidr
cidrset, multicidrset: directly use getIndexForIP method
2023-05-11 10:59:36 -07:00
Daniel Smith
1ffe3f467e lavalamp is taking a long break 2023-05-11 16:43:38 +00:00
SataQiu
3fa55d469c fix a bug where the AttachedVolume is not printed correctly in the log 2023-05-11 22:04:30 +08:00
Tobias Klauser
e7c679c362
cidrset, multicidrset: directly use getIndexForIP method
Instead of constructing a *net.IPnet whose .Mask field is never used,
call the getIndexForIP method of *CidrSet and *MultiCIDRSet directly.
2023-05-11 10:53:03 +02:00
zach593
e3d5feb76c fix HPA plain metric calculate
fix inconsistency in plain metric replica calculator when usageRatio == 1.0, keep same with resource replicas
2023-05-10 11:14:29 +08:00
Yuki Iwai
e4340f0d9b Job: Use generic Set in controller
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-05-08 15:02:23 +09:00
Kante Yin
a7035f5459 Pass Context to StartTestServer
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:25:09 +08:00
Akhil Velagapudi
69eccd41b8 endpointslice: reduce visibility of vars/funcs
Reduce the visibility of various public identifiers that are only used
within the scope of a package.

This was originally motivated by KEP-3685 in order to reduce the public
API surface and improve supportability.
2023-05-02 15:58:07 -07:00
Kubernetes Prow Robot
42799903af
Merge pull request #117626 from skitt/intstr-fromint32-cloud-network
Network: use new intstr functions
2023-05-02 08:18:59 -07:00
Stephen Kitt
1c4b97ea27
network: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-05-01 09:17:30 +02:00
Stephen Kitt
5bfe738af2
apps: replace intstr.FromInt with intstr.FromInt32
This touches cases where FromInt() is used on numeric constants, or
values which are already int32s, or int variables which are defined
close by and can be changed to int32s with little impact.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-05-01 09:17:05 +02:00
Sheng Zhan
892ebf2d25
Ensure version "*" is passed instead of "" for all authz checks (#116937)
* ensure version * is passed instead of  for all authz checks

* unexport match function

* remove allversion constant
2023-04-25 09:06:18 -07:00
Kubernetes Prow Robot
29fe2c70b1
Merge pull request #117252 from alculquicondor/node-lifecycle-owner
Add SIG ownership to controller/nodelifecycle
2023-04-17 14:10:57 -07:00
Hao Ruan
c4e1b01416 replace spew methods with dump methods 2023-04-14 08:05:53 +08:00
Claudiu Belu
0979d55443 unit tests: Skip flaky tests on Windows (part 2)
Some of the unit tests are currently flaky on Windows. This commit
skips them until they are resolved.
2023-04-13 12:07:18 +00:00
Kubernetes Prow Robot
c3e3ff989a
Merge pull request #116896 from thockin/apimachinery_util_diff_cleanup
apimachinery util/diff cleanups
2023-04-13 02:26:37 -07:00
Kubernetes Prow Robot
5550bd5eac
Merge pull request #117249 from tnqn/fix-data-race
Fix a data race in TopologyCache
2023-04-12 16:28:30 -07:00
Kubernetes Prow Robot
9082903f94
Merge pull request #117245 from tnqn/fix-topology-hint
Fix TopologyAwareHint not working when zone label is added after Node creation
2023-04-12 13:24:44 -07:00
Aldo Culquicondor
b23ab389b4
Add SIG ownership to controller/nodelifecycle
Change-Id: I31a329d9ca08bdf12a428cae44a5f061afa01e73
2023-04-12 15:42:06 -04:00
Quan Tian
d567d61aa5 Fix a data race in TopologyCache
The member variable `cpuRatiosByZone` should be accessed with the lock
acquired as it could be be updated by `SetNodes` concurrently.

Signed-off-by: Quan Tian <qtian@vmware.com>
Co-authored-by: Antonio Ojea <aojea@google.com>
2023-04-13 02:03:16 +08:00
Quan Tian
a62563f130 Fix TopologyAwareHint not working when zone label is added after Node creation
The topology.kubernetes.io/zone label may be added by could provider
asynchronously after the Node is created. The previous code didn't
update the topology cache after receiving the Node update event, causing
TopologyAwareHint to not work until kube-controller-manager restarts or
other Node events trigger the update.

Signed-off-by: Quan Tian <qtian@vmware.com>
2023-04-13 01:47:55 +08:00
Tim Hockin
bc302fa414
Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
2023-04-12 08:48:03 -07:00
Tim Hockin
9627c50ef3
Replace uses of ObjectGoPrintDiff with cmp.Diff
ObjectGoPrintDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
2023-04-12 08:46:16 -07:00
Tim Hockin
29c0b73d64
Replace uses of diff.ObjectDiff with cmp.Diff
ObjectDiff is already a shim over cmp.Diff, so no actual output or
behavior changes
2023-04-12 08:46:12 -07:00
Andrea Tosatto
d09842e0ad
node-lifecycle-controller: improve monitorNodeHealth test-coverage (#116687)
* node-lifecycle-controller: refactor monitorNodeHealth tests to improve test-coverage

* address PR review comments

* dedupe test logic
2023-04-12 07:02:33 -07:00
Kubernetes Prow Robot
4e2977d462
Merge pull request #117178 from gjtempleton/SIG-Autoscaling-Cleanup-HPA-OWNERS
HPA Controller - Update Owners
2023-04-11 21:17:42 -07:00