-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Remove use of deprecated functions in VPA #8904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Only for upstream dependencies
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianmoisey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| } | ||
|
|
||
| testClientSet := fake.NewSimpleClientset() | ||
| testClientSet := fake.NewClientset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a little strange.
NewSimpleClientset has been deprecated for a while, however, they were tagged incorrectly.
In 1.35 the tagging was fixed (kubernetes/kubernetes@8c139fb)
So any use of NewSimpleClientset is deprecated (according to tooling)
Except for VPA's own NewSimpleClientset.
While it's been generated with 1.34, it won't be tagged correctly for generation, see.
autoscaler/vertical-pod-autoscaler/pkg/client/clientset/versioned/fake/clientset_generated.go
Lines 39 to 47 in e52bd14
| // NewSimpleClientset returns a clientset that will respond with the provided objects. | |
| // It's backed by a very simple object tracker that processes creates, updates and deletions as-is, | |
| // without applying any field management, validations and/or defaults. It shouldn't be considered a replacement | |
| // for a real clientset and is mostly useful in simple unit tests. | |
| // | |
| // DEPRECATED: 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). | |
| func NewSimpleClientset(objects ...runtime.Object) *Clientset { |
But, the replacement function requires someone to run code-gen with --with-applyconfig enabled
I figured I'd leave that for another PR, or, bundle it into the PR that bumps the kubernetes dependencies to 1.35.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Remove deprecated functions, in preparation for the Kubernetes 1.35 release.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: