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

Cleanup: remove unnecessary check controllerutil.IsCacheNotStarted in controllers #9168

Merged
merged 6 commits into from Mar 1, 2022

Conversation

vgramer
Copy link
Contributor

@vgramer vgramer commented Mar 1, 2022

What does this PR do / Why do we need it:

In some controllers we check if error is due to cache not started.

err := r.reconcile(ctx, log, request)
if controllerutil.IsCacheNotStarted(err) {
   return reconcile.Result{RequeueAfter: 5 * time.Second}, nil
}

However since controller-runtime v0.8.1, the manager starts all caches before other Runnables kubernetes-sigs/controller-runtime#1327. Consequently, this check is not needed anymore.

This pr cleanup the controllers.

Special notes for your reviewer:

Documentation:

Does this PR introduce a user-facing change?:

NONE

since controller-runtime v0.8.1, manager start all caches before other Runnables so this function is not need anymore cf kubernetes-sigs/controller-runtime#1327

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
…ve unecessary check

since controller-runtime v0.8.1 the manager start all cache before running runables, so this error can not happen.

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
…nchronizer.go: remove unecessary check

since controller-runtime v0.8.1 the manager start all cache before running runables, so this error can not happen.

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
…oller.go: remove unecessary check

since controller-runtime v0.8.1 the manager start all cache before running runables, so this error can not happen.

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
… remove unecessary check

since controller-runtime v0.8.1 the manager start all cache before running runables, so this error can not happen.

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
…: remove unecessary check

since controller-runtime v0.8.1 the manager start all cache before running runables, so this error can not happen.

Signed-off-by: Vincent Gramer <vincent@kubermatic.com>
@kubermatic-bot kubermatic-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 1, 2022
@vgramer
Copy link
Contributor Author

vgramer commented Mar 1, 2022

/assign @xrstf

Copy link
Contributor

@xrstf xrstf left a comment

Choose a reason for hiding this comment

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

/approve
/retest

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2022
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f3153f47ab685a5b1a2be07797e3cb5acdd964d9

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vgramer, xrstf

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

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 1, 2022
@kubermatic-bot kubermatic-bot merged commit 4eb2eb7 into kubermatic:master Mar 1, 2022
@vgramer vgramer deleted the cleanup branch March 1, 2022 17:31
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants