-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Labels
kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.
Description
Summary
With the upgrade to k8s.io/client-go v0.35.0 (PR #2396), fakeclient.NewSimpleClientset is now deprecated in favor of NewClientset.
The deprecation message states:
NewClientset replaces this with support for field management, which significantly improves server side apply testing. NewClientset is only available when apply configurations are generated (e.g. via --with-applyconfig).
Affected Files
The following files have //nolint:staticcheck directives that should be removed once the migration is complete:
pkg/nfd-master/nfd-api-controller_test.gopkg/nfd-master/nfd-master-internal_test.gopkg/nfd-master/nfd-master_test.gopkg/nfd-master/updater-pool_test.gopkg/nfd-worker/nfd-worker-internal_test.gopkg/nfd-worker/nfd-worker_test.gopkg/resourcemonitor/podresourcesscanner_test.go(file-level nolint directive)
Required Work
- Generate apply configurations for the fake client (requires
--with-applyconfigflag in code generation) - Replace all
fakeclient.NewSimpleClientset()calls withfakeclient.NewClientset() - Remove all
//nolint:staticcheckdirectives added in PR build(deps): bump the k8sio group across 1 directory with 2 updates #2396
References
- PR build(deps): bump the k8sio group across 1 directory with 2 updates #2396: k8s.io/kubernetes v1.35.0 upgrade
- k8s.io/client-go deprecation: https://pkg.go.dev/k8s.io/client-go/kubernetes/fake#NewSimpleClientset
/kind cleanup
/priority backlog
Metadata
Metadata
Assignees
Labels
kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.