Skip to content
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

Fix multiple run of informers created in fetcher.go #6157

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

mikutas
Copy link
Contributor

@mikutas mikutas commented Sep 28, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

Suppress warn logs The sharedIndexInformer has started, run more than once is not allowed appear at every admission-controller startup

Which issue(s) this PR fixes:

Fixes #6156

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 28, 2023
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 28, 2023
@mikutas mikutas marked this pull request as ready for review September 28, 2023 07:47
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 28, 2023
go informer.Run(stopCh)
ok := cache.WaitForCacheSync(stopCh, informer.HasSynced)
if !ok {
if !f.Core().V1().LimitRanges().Informer().HasSynced() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need this inner if? It seems to be redundant with cache.WaitForCacheSync(stopCh, informer.HasSynced)

@mikutas mikutas requested a review from laoj2 October 18, 2023 00:25
@laoj2
Copy link
Contributor

laoj2 commented Oct 18, 2023

/lgtm

cc @jbartosik @kwiesmueller

@k8s-ci-robot
Copy link
Contributor

@laoj2: changing LGTM is restricted to collaborators

In response to this:

/lgtm

cc @jbartosik

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@kwiesmueller kwiesmueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kwiesmueller, laoj2, mikutas

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 18, 2023
@k8s-ci-robot k8s-ci-robot merged commit dab41cc into kubernetes:master Oct 18, 2023
6 checks passed
@mikutas mikutas deleted the 6156-informer branch October 18, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[VPA] sharedIndexInformer started twice
4 participants