Skip to content

Migrate to controller-runtime v0.23+ Event Recorder API#1

Open
dongjiang1989 wants to merge 586 commits into
mainfrom
new-eventRecorderFor
Open

Migrate to controller-runtime v0.23+ Event Recorder API#1
dongjiang1989 wants to merge 586 commits into
mainfrom
new-eventRecorderFor

Conversation

@dongjiang1989

Copy link
Copy Markdown
Owner

Description

This PR migrates kueue to use the new Event Recorder API introduced in controller-runtime v0.23.

Background

controller-runtime v0.23 migrates event recording toward the newer events.k8s.io API. As part of this migration, mgr.GetEventRecorderFor(...) is deprecated in favor of mgr.GetEventRecorder(...).

Changes

API Changes

  • Replace mgr.GetEventRecorderFor(...) with mgr.GetEventRecorder(...)
  • Update Recorder field type from record.EventRecorder to events.EventRecorder
  • Update imports from k8s.io/client-go/tools/record to k8s.io/client-go/tools/events

Event Call Updates

  • Update Event and Eventf calls to new signature:
    • Old: Event(obj, eventType, reason, message)
    • New: Eventf(regarding, related, eventtype, reason, action, note, args...)

RBAC Updates

  • Update RBAC comments to use events.k8s.io API group:
    • Old: // +kubebuilder:rbac:groups="",resources=events
    • New: // +kubebuilder:rbac:groups=events.k8s.io,resources=events

Test Updates

  • Update test files to use &utiltesting.EventRecorder{} instead of record.NewBroadcaster().NewRecorder()

Linter Configuration

  • Remove GetEventRecorderFor deprecation ignore rule from .golangci.yaml

Testing

All unit tests pass:

go test ./pkg/... ./cmd/... -short  # PASS
go build ./...  # PASS
go vet ./...  # PASS

Related Issues

Fixes: N/A (cleanup task for controller-runtime v0.23 migration)

Release Note

Change GetEventRecorderFor to GetEventRecorder in controller-runtime

mbobrovskyi and others added 30 commits February 10, 2026 17:02
…rnetes-sigs#9079)

* Fix flaky "infinite preemption cycle" test with unique CQ names

Avoid Prometheus metric collision by using ns.Name in ClusterQueue
names (best-effort-cq-a/b) so each spec has its own metric series.

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

* Refactor createWorkloadWithPriority to accept string instead of queue

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

---------

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
This commit ensures that the metrics certificate
is reloaded in the server in case the certificate data
is updated.
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
* Add init containers sanitization

Sort imports

* PR comments

* Remove redundant test

* Verification fix
* Update main with the latest v0.16.1

* Fix the prepare-release-branch

* Fix badge bump
* [Refactor] Use methods for interation with inadmissibleWorkloads

* add hasKey

* delete forEach
* Extract common MultiKueue test utilities to shared package

Move reusable test helper functions from multikueue e2e suite_test.go
to test/util/multikueue.go for sharing across test suites.

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

* Add MultiKueue + DRA integration and e2e tests

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

---------

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
* Group parallel verify output by target

Add --output-sync=target to make verify to group output by target,
making failed target errors easier to find in CI logs.

The feature requires GNU Make 4.0+ and can be disabled with
VERIFY_OUTPUT_SYNC= for older Make versions.

* Disable --output-sync on macOS by default

macOS ships with GNU Make 3.81 which does not support
--output-sync. Skip the flag on Darwin by default, keeping
it enabled on Linux where CI runs Make 4.0+.

Users with Homebrew GNU Make can still opt in via
VERIFY_OUTPUT_SYNC=target make verify.
…ernetes-sigs#9101)

* Fix non-deterministic workload ordering in ClusterQueue

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

* Fix eviction ordering flakiness due to second-level timestamp tie

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>

---------

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
Bumps golang from 1.25-alpine to 1.26-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#9150)

Bumps the all group with 2 updates in the /cmd/kueueviz/frontend directory: [@mui/icons-material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material) and [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react).


Updates `@mui/icons-material` from 7.3.7 to 7.3.8
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v7.3.8/packages/mui-icons-material)

Updates `@mui/material` from 7.3.7 to 7.3.8
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v7.3.8/packages/mui-material)

Updates `@vitejs/plugin-react` from 5.1.3 to 5.1.4
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@5.1.4/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@mui/icons-material"
  dependency-version: 7.3.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: "@mui/material"
  dependency-version: 7.3.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 5.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ubernetes-sigs#9147)

Bumps cypress/base from 24.13.0 to 24.13.1.

---
updated-dependencies:
- dependency-name: cypress/base
  dependency-version: 24.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…s#8711)

Ensure perf recorder exits reliably under load by coalescing CQ
state updates and adding a ticker-based exit check; also track
dropped WL events in the summary.
ikchifo and others added 30 commits March 3, 2026 20:39
* Add TAS asymmetric-quota tests to multikueue E2E suite

Add two new test cases to the existing multikueue TAS Describe
block in test/e2e/multikueue/tas_test.go, using asymmetric
worker quotas (worker1=2CPU, worker2=1CPU) to enable
deterministic routing assertions:

- Preferred topology routing: 1500m CPU job routes to worker1
- Required topology: 500m CPU job admitted on either worker

Extract waitForTopologyAssignment and
waitForDelayedTopologyRequestReady helpers to reduce
duplication across existing and new tests. Use
MakeDefaultOneLevelTopology and batchv1.JobNameLabel
for consistency.

* fix: hoist managerWl outside Eventually in waitForDelayedTopologyRequestReady
Signed-off-by: falconlee236 <falconlee236@gmail.com>
…netes-sigs#9643)

The LendingLimit feature was promoted to GA in v0.17, not v0.18.
Update the feature-state version tag to reflect the correct version.
… time to 7d (kubernetes-sigs#9540)

* Set SA expiration time to 7d for e2e dev mode

* update worker-cluster.kind.yaml

* update worker-cluster.kind.yaml

* Revert "Merge branch 'cleanup/mk-dev-setup-sa-token-exp-e2e' of https://github.com/polinasand/kueue into cleanup/mk-dev-setup-sa-token-exp-e2e"

This reverts commit e5b959e, reversing
changes made to 33a4149.
* Add wayve.ai as an adopter

* Improved description

* Fix syntax issue
…ing kubeconfig (kubernetes-sigs#9604)

* Fix Multikueue E2E script swallowing cluster creation errors and locking kubeconfig

Signed-off-by: Tapan Manu <tapanmanu2000@gmail.com>

* Adding messages pinpointing failures alogn failfast

Signed-off-by: Tapan Manu <tapanmanu2000@gmail.com>

* formatting log

Signed-off-by: Tapan Manu <tapanmanu2000@gmail.com>

* untangling code

Signed-off-by: Tapan Manu <tapanmanu2000@gmail.com>

---------

Signed-off-by: Tapan Manu <tapanmanu2000@gmail.com>
…ce (kubernetes-sigs#9660)

* Update RayService E2E test to check http endpoint inside the RayService

* Use system generated port like 0:remotePort
…rnetes-sigs#9651)

* Forcefully remove stuck pods in the failure recovery controller

* Add e2e test for `FailureRecoveryPolicy`

* Exclude buffer from the termination timeout

* Add e2e test for `FailureRecoveryPolicy` during foreground deletion

* Code review fixes

* Update the KEP with the new failure recovery logic

* Rename 'terminate' to 'delete'

* Fix e2e test

* Check the failure recovery condition to filter out more executions

* Add missing `gomega.Succeed()`

* Fix import formatting

* Fix e2e test timeouts

* Mention condition check in KEP

* Wait longer for job to be admitted in e2e test

* Use `ContainsFunc` in Pod utils

* Wrap the e2e tests with ginkgo.By

* Shorten the pod grace termination period

* Add `ginkgo.By` steps to `BeforeEach` and `AfterEach`
…tion candidates (kubernetes-sigs#8551)

* Add a mechanism to consider preemption cost when finding preemption candidates kubernetes-sigs#7990

* Add a mechanism to consider preemption cost when finding preemption candidates kubernetes-sigs#7990

* Address comments

* Add a mechanism to consider preemption cost when finding preemption candidates kubernetes-sigs#7990

* priority-boost

* Add a mechanism to consider preemption cost when finding preemption candidates kubernetes-sigs#7990

* Address comments

* Add a mechanism to consider preemption cost when finding preemption candidates kubernetes-sigs#7990

* Address comments
…d deletion fix (kubernetes-sigs#9675)

* Mention the annotation name change in the KEP history

* Mention which versions use which annotation name

* Mention which versions retain the old behaviour
…s#9661)

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
…gs#9631)

Signed-off-by: Pannaga Rao Bhoja Ramamanohara

Signed-off-by: Pannaga Rao Bhoja Ramamanohara
* Fix typo in README: 'Build-in' → 'Built-in'

* docs: fix abbreviation formatting: 'eg.' → 'e.g.'
* Create integration test.

Co-authored-by: Irving Mondragón <irvingmg@users.noreply.github.com>

* TAS: support ResourceTransformations

---------

Co-authored-by: Irving Mondragón <irvingmg@users.noreply.github.com>
* make test-e2e not parsing GINKGO_ARGS properly kubernetes-sigs#9477

* Fix shellcheck SC2086 ignore kubernetes-sigs#9477
* Promote HierarchicalCohorts to GA

Signed-off-by: Pannaga Rao Bhoja Ramamanohara

* Remove deprecated API references

Signed-off-by: Pannaga Rao Bhoja Ramamanohara

---------

Signed-off-by: Pannaga Rao Bhoja Ramamanohara
…ubernetes-sigs#9091)

* Fix generateName for StatefulSets by including UID in workload name

* Support StatefulSet workloads created without UID in name

* Propagate non-NotFound errors in findWorkloadName
Signed-off-by: Dong Jiang <dongjiang1989@126.com>
Signed-off-by: Dong Jiang <dongjiang1989@126.com>
Signed-off-by: Dong Jiang <dongjiang1989@126.com>
Signed-off-by: Dong Jiang <dongjiang1989@126.com>
Signed-off-by: Dong Jiang <dongjiang1989@126.com>
Signed-off-by: dongjiang <dongjiang2010@gmail.com>
Signed-off-by: jiangdong <jiangdong@iflytek.com>
Signed-off-by: Dong Jiang <dongjiang1989@126.com>
Signed-off-by: dongjiang <dongjiang2010@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.