Commit Graph

5455 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
a26f3fd5c6 Merge pull request #132109 from linxiulei/jobdelay
Clean backoff record earlier
2025-06-06 13:38:38 -07:00
Eric Lin
1f46b3fdbf Clean backoff record earlier
Once received job deletion event, it cleans the backoff records for that
job before enqueueing this job so that we can avoid a race condition
that the syncJob() may incorrect use stale backoff records for a newly created
job with same key.

Co-authored-by: Michal Wozniak <michalwozniak@google.com>
2025-06-06 18:31:38 +00:00
Maciej Szulik
b5a8f5d0a5 KEP-3715: drop ElasticIndexedJob feature gate
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2025-06-06 16:08:21 +02:00
Kubernetes Prow Robot
0731167a99 Merge pull request #131996 from ritazh/dra-adminaccess-updatelabelkey
DRAAdminAccess: update label key
2025-06-04 12:16:45 -07:00
Kubernetes Prow Robot
e0859f91b7 Merge pull request #131887 from ania-borowiec/extract_cyclestate_interface
Moving Scheduler interfaces to staging: split CycleState into interface and implementation, move interface to staging repo
2025-05-30 04:00:18 -07:00
Patrick Ohly
4f91a69f2b DRA integration: move and extend device status test
This moves the enabled/disabled test into the common test/integration/dra which
simplifies the code a bit and amortizes the cost of starting the apiserver
because several different tests can use the same instance, running in parallel.

While at it, setting the status via SSA also gets tested.
2025-05-30 10:29:18 +02:00
Ania Borowiec
d75af825fb Extract interface CycleState and move is to staging repo. CycleState implementation remains in k/k/pkg/scheduler/framework 2025-05-29 16:18:36 +00:00
Kubernetes Prow Robot
ce21ce5d3b Merge pull request #131869 from pohly/dra-test-integration-scheduling
DRA integration: set up nodes for scheduling
2025-05-28 11:36:24 -07:00
Rita Zhang
5058e385b0 DRAAdminAccess: update label key
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2025-05-27 21:19:25 -07:00
Kensei Nakada
f694c58c6c feat: graduate QueueingHint to GA 2025-05-26 21:23:46 +02:00
Patrick Ohly
e63019a870 DRA integration: refactor code to support other tests
Creating class, claim and pod is expected to be fairly common.
2025-05-23 17:52:26 +02:00
Patrick Ohly
50f152440b DRA integration: start scheduler on demand
As soon as we have more than one test using the scheduler, we need some
coordination between tests. This is handled by a singleton which starts the
scheduler for the first user and stops it after the last one is gone.

To avoid having to pass around an additional parameter, the context is used to
access the singleton under the hood.
2025-05-23 15:04:00 +02:00
googs1025
01820ff7c2 chore(scheduler): add filter integration tests for missing part plugins: NodeAffinity plugin
Signed-off-by: googs1025 <googs1025@gmail.com>
2025-05-23 18:02:32 +08:00
Kubernetes Prow Robot
b5608aea94 Merge pull request #131845 from serathius/unify-metrics
Unify references to group resource in metrics
2025-05-22 07:32:35 -07:00
Kubernetes Prow Robot
6da56bd4b7 Merge pull request #131752 from aramase/aramase/f/kep_3331_v1_api
Duplicate v1beta1 AuthenticationConfiguration to v1
2025-05-20 20:54:34 -07:00
Anish Ramasekar
67345417c0 Update tests to use v1 for AuthenticationConfiguration
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-05-20 16:42:23 -07:00
Morten Torkildsen
b98b86bd6a DRA: Add scheduler perf test for partitionable devices (#131771) 2025-05-20 09:57:16 -07:00
Patrick Ohly
60c36432f2 DRA integration: set up nodes for scheduling
This enables proper scheduling tests. Most of them are probably better done in
scheduler_perf where the same test then can also be used for benchmarking and
creating objects is a bit better supported (from YAML, for example), but some
special cases (in particular, anything involving error injection) are better
done here.
2025-05-20 17:43:30 +02:00
Marek Siarkowicz
f712b01ddb Unify references to group resource in metrics
Skip apiserver_storage_objects as it's a stable metrics that doesn't
have "group" label. As defined in KEP-1209 adding a label is considered
a breaking change so this change should be done via deprecation and
introduction of new metric.

Tested via:
```
kubectl get --raw /metrics | grep -i apiservice | grep -v APIServiceRegistrationController | grep -v aggregator_unavailable_apiservice | python3 -c "import sys; print('\n'.join([k+' ' + v for k,v in {a.split('{')[0]:'{'+a.split('{')[1].split('}')[0]+'}' for a in sys.stdin.readlines() if '#' not in a and '_sum' not in a and '_bucket' not in a}.items()]))"
```

Before:
```
apiserver_cache_list_fetched_objects_total {index="",resource_prefix="/apiregistration.k8s.io/apiservices"}
apiserver_cache_list_returned_objects_total {resource_prefix="/apiregistration.k8s.io/apiservices"}
apiserver_cache_list_total {index="",resource_prefix="/apiregistration.k8s.io/apiservices"}
apiserver_longrunning_requests {component="apiserver",group="apiregistration.k8s.io",resource="apiservices",scope="cluster",subresource="",verb="WATCH",version="v1"}
apiserver_request_body_size_bytes_count {resource="apiservices.apiregistration.k8s.io",verb="create"}
apiserver_request_duration_seconds_count {component="apiserver",dry_run="",group="apiregistration.k8s.io",resource="apiservices",scope="resource",subresource="",verb="POST",version="v1"}
apiserver_request_sli_duration_seconds_count {component="apiserver",group="apiregistration.k8s.io",resource="apiservices",scope="resource",subresource="",verb="POST",version="v1"}
apiserver_request_total {code="201",component="apiserver",dry_run="",group="apiregistration.k8s.io",resource="apiservices",scope="resource",subresource="",verb="POST",version="v1"}
apiserver_response_sizes_count {component="apiserver",group="apiregistration.k8s.io",resource="apiservices",scope="cluster",subresource="",verb="LIST",version="v1"}
apiserver_selfrequest_total {resource="apiservices",subresource="",verb="POST"}
apiserver_storage_events_received_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_storage_list_evaluated_objects_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_storage_list_fetched_objects_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_storage_list_returned_objects_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_storage_list_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_storage_objects {resource="apiservices.apiregistration.k8s.io"}
apiserver_watch_cache_events_dispatched_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_watch_cache_events_received_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_watch_cache_initializations_total {resource="apiservices.apiregistration.k8s.io"}
apiserver_watch_cache_resource_version {resource="apiservices.apiregistration.k8s.io"}
apiserver_watch_events_sizes_count {group="apiregistration.k8s.io",kind="APIService",version="v1"}
apiserver_watch_events_total {group="apiregistration.k8s.io",kind="APIService",version="v1"}
etcd_request_duration_seconds_count {operation="listWithCount",type="/registry/apiregistration.k8s.io/apiservices/"}
etcd_requests_total {operation="listWithCount",type="/registry/apiregistration.k8s.io/apiservices/"}
watch_cache_capacity {resource="apiservices.apiregistration.k8s.io"}
```

After:
```
apiserver_cache_list_fetched_objects_total {group="apiregistration.k8s.io",index="",resource="apiservices"}
apiserver_cache_list_returned_objects_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_cache_list_total {group="apiregistration.k8s.io",index="",resource="apiservices"}
apiserver_longrunning_requests {component="apiserver",group="apiregistration.k8s.io",resource="apiservices",scope="cluster",subresource="",verb="WATCH",version="v1"}
apiserver_request_body_size_bytes_count {group="apiregistration.k8s.io",resource="apiservices",verb="create"}
apiserver_request_duration_seconds_count {component="apiserver",dry_run="",group="apiregistration.k8s.io",resource="apiservices",scope="resource",subresource="",verb="POST",version="v1"}
apiserver_request_sli_duration_seconds_count {component="apiserver",group="apiregistration.k8s.io",resource="apiservices",scope="resource",subresource="",verb="POST",version="v1"}
apiserver_request_total {code="201",component="apiserver",dry_run="",group="apiregistration.k8s.io",resource="apiservices",scope="resource",subresource="",verb="POST",version="v1"}
apiserver_response_sizes_count {component="apiserver",group="apiregistration.k8s.io",resource="apiservices",scope="cluster",subresource="",verb="WATCH",version="v1"}
apiserver_selfrequest_total {group="apiregistration.k8s.io",resource="apiservices",subresource="",verb="WATCH"}
apiserver_storage_events_received_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_storage_list_evaluated_objects_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_storage_list_fetched_objects_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_storage_list_returned_objects_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_storage_list_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_storage_objects {resource="apiservices.apiregistration.k8s.io"}
apiserver_watch_cache_events_dispatched_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_watch_cache_events_received_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_watch_cache_initializations_total {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_watch_cache_resource_version {group="apiregistration.k8s.io",resource="apiservices"}
apiserver_watch_events_sizes_count {group="apiregistration.k8s.io",resource="apiservices",version="v1"}
apiserver_watch_events_total {group="apiregistration.k8s.io",resource="apiservices",version="v1"}
etcd_bookmark_counts {group="apiregistration.k8s.io",resource="apiservices"}
etcd_request_duration_seconds_count {group="apiregistration.k8s.io",operation="listWithCount",resource="apiservices"}
etcd_requests_total {group="apiregistration.k8s.io",operation="listWithCount",resource="apiservices"}
watch_cache_capacity {group="apiregistration.k8s.io",resource="apiservices"}
```
2025-05-19 13:07:42 +02:00
Kubernetes Prow Robot
82db38a23c Merge pull request #128748 from sanposhiho/attempt-incre
feat: introduce pInfo.UnschedulableCount to make the backoff calculation more appropriate
2025-05-19 01:21:15 -07:00
Kensei Nakada
adc4916dfe feat: introduce pInfo.UnschedulableCount to make the backoff calculation more appropriate 2025-05-17 12:39:58 +02:00
Kubernetes Prow Robot
92f6854b3d Merge pull request #131763 from macsko/add_sig_scheduling_label_to_perf_and_staging
Add sig/scheduling label to scheduler_perf and staging repo OWNERS
2025-05-15 01:05:20 -07:00
Kubernetes Prow Robot
0113538e59 Merge pull request #127180 from sanposhiho/general-gate
feat: introduce pInfo.GatingPlugin to filter out events more generally
2025-05-14 05:13:18 -07:00
Maciej Skoczeń
5121115711 Add sig/scheduling label to scheduler integration tests and staging repo OWNERS 2025-05-14 11:39:04 +00:00
Kubernetes Prow Robot
49b8845970 Merge pull request #131710 from saza-ku/fix-test-node-affinity-scoring
test: wait for nodes to be in scheduler's cache
2025-05-14 03:15:19 -07:00
Kubernetes Prow Robot
c96032addd Merge pull request #131318 from aojea/lock_servicecidr
Lock MultiCIDRServiceAllocator to default and DisableAllocatorDualWrite to GA
2025-05-13 09:51:28 -07:00
saza-ku
e5f7fc25e7 TestNodeAffinityScoring: wait all nodes 2025-05-13 16:18:19 +09:00
saza-ku
3911b677bd test: wait for nodes to be in scheduler's cache 2025-05-10 18:17:38 +09:00
Kensei Nakada
47d296d62d feat: introduce pInfo.GatingPlugin to filter out events more generally 2025-05-07 13:54:47 +02:00
Antonio Ojea
55b5827d8f integration: etcd data
Co-authored-by: Siyuan Zhang <sizhang@google.com>
2025-05-06 13:59:36 +00:00
Antonio Ojea
aa9f156d7a integration test for compatibility version
set emulation version for the test that require to disable the
locked feature gate.
2025-05-06 13:59:09 +00:00
Patrick Ohly
3b5cfeaf20 DRA: use v1beta2
DRA drivers must provide ResourceSlices using the v1beta2 API types.
The controller then converts under the hood to v1beta1 if needed, i.e.
drivers are compatible with Kubernetes 1.32 and Kubernetes 1.33, as
long as at least one beta API group is enabled.

Testing pivots from using v1beta1 as the main API to v1beta2, with only one
test case exercising v1beta1.
2025-05-05 08:49:09 +02:00
Patrick Ohly
a171795e31 DRA resourceslices: better error reporting
A user of the controller can register an error handler via the controller
options. For a kubelet plugin, the error handler is method in the interface
which must be implemented. This is a conscious choice to make DRA driver
developer aware that they should react intelligently to errors.

The controller will invoke that handler with all errors that it encounters
while syncing the desired set of slices. This includes validation errors from
the apiserver if the driver's slices are invalid. Dropped fields get reported
with a special DroppedFieldsError.
2025-05-05 08:40:52 +02:00
Jordan Liggitt
6bb6c99342 Drop null creationTimestamp from test fixtures 2025-05-02 15:38:40 -04:00
Abhijit Hoskeri
db960d1007 Fix openid discovery docs with external jwt signer.
If the external jwt signer is enabled, publishing
OIDC discovery docs and keys fails because the PublicKeysGetter
is not wired correctly.

Set the public keys getter on startup so public key
discovery works in that case as well.
2025-04-26 17:39:31 -07:00
Kubernetes Prow Robot
fe5afa919b Merge pull request #130333 from kmala/job
handle job complete update delayed event
2025-04-25 17:55:22 -07:00
Kubernetes Prow Robot
05a3d178a2 Merge pull request #129564 from Jefftree/compat-134
Bump DefaultKubeBinaryVersion to 1.34 and fix VAP test
2025-04-24 15:24:30 -07:00
Kubernetes Prow Robot
a88a8238d7 Merge pull request #131416 from alculquicondor/rm-alculquicondor
Remove alculquicondor from test framework OWNERS
2025-04-23 18:21:36 -07:00
Kubernetes Prow Robot
4841bc9a1f Merge pull request #131349 from pohly/etcd-shutdown
etcd: fix 5 second delay during shutdown
2025-04-23 18:21:06 -07:00
Kubernetes Prow Robot
2867fed217 Merge pull request #131288 from carlory/deflake-TestEndpointHandlers
deflake intergation test: TestEndpointHandlers
2025-04-23 18:20:44 -07:00
Kubernetes Prow Robot
75c640bc02 Merge pull request #131278 from haosdent/haosdent/remove-redundant-call
scheduler: remove duplicate nominatedNodeName clearing in preemption
2025-04-23 18:20:30 -07:00
Kubernetes Prow Robot
d895ad2181 Merge pull request #131259 from pohly/etcd-output-and-retry
etcd: use Unix Domain socket
2025-04-23 17:10:05 -07:00
Kubernetes Prow Robot
ec40244141 Merge pull request #131149 from saza-ku/enable-api-server-init
scheduler-perf: add option to enable api-server initialization
2025-04-23 17:08:44 -07:00
Kubernetes Prow Robot
0d4edac675 Merge pull request #131079 from macsko/disable_thresholds_for_preemption_tests
Disable thresholds for PreemptionBasic and PreemptionPVs tests
2025-04-23 15:59:35 -07:00
Kubernetes Prow Robot
8a6b916765 Merge pull request #130720 from saintube/scheduler-expose-nodeinfo-in-prefilter
Expose NodeInfo to PreFilter plugins
2025-04-23 13:31:29 -07:00
Aldo Culquicondor
4fa090bd81 Remove alculquicondor from test framework OWNERS 2025-04-23 14:03:19 +00:00
Jefftree
722581f5f6 Expand etcd data test to n-3 2025-04-21 17:34:42 +00:00
Jefftree
c21f26895c Fix VAP test for v1.34 2025-04-21 17:34:41 +00:00
Patrick Ohly
8672956f73 etcd: use Unix Domain socket for testserver
Choosing a port in advance is racy. A better solution is to use a Unix Domain
socket in the per-etcd-instance data directory. Then the name can be determined
in advance and there's no risk of conflicts with other etcd instances.

With unix:// for the endpoint, we have to be a bit more careful about
passing a TLS config to the etcd client library because for unix://, in
contrast to http://, it tries to use an incomplete config which
then fails to establish the connection.
2025-04-17 14:41:43 +02:00
Patrick Ohly
33f16a55ba etcd: fix 5 second delay during shutdown
The main goroutine always waited for the background goroutine, which itself
only proceeded after the 5 second timeout. To tell the goroutine that it is
okay to stop immediately, the main goroutine must cancel the context as soon
as etcd has quit.
2025-04-17 14:26:54 +02:00