-
Notifications
You must be signed in to change notification settings - Fork 4k
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
chore: replace deprecated NewIndexerInformer #7727
chore: replace deprecated NewIndexerInformer #7727
Conversation
Signed-off-by: Omer Aplatony <[email protected]>
/retest |
/milestone vertical-pod-autoscaler-1.4.0 |
/hold |
Signed-off-by: Omer Aplatony <[email protected]>
Ping @adrianmoisey |
/lgtm thanks! |
store, controller := cache.NewInformerWithOptions(informerOptions) | ||
indexer, ok := store.(cache.Indexer) | ||
if !ok { | ||
klog.ErrorS(nil, "Expected Indexer, but got a Store that does not implement Indexer") |
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.
Can we use klog.Fatal
here instead?
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.
I prefer to use klog.ErrorS
+ os.Exit
. Please take a look at: kubernetes/klog#416
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.
TIL, thanks!
/lgtm /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: omerap12, raywainman 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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
NewIndexerInformer
is deprecated, this PR replace it by usingNewInformerWithOptions
insteadWhich 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.: