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

chore: Convert to controller-runtime's new reconcile.AsReconciler #1247

Merged

Conversation

jonathan-innis
Copy link
Member

Fixes #N/A

Description

Removes our controller.TypedController and replaces it with controller-runtime's typed controller implementation e.g. reconcile.AsReconciler()

How was this change tested?

make presubmit

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jonathan-innis

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 13, 2024
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 13, 2024
@coveralls
Copy link

coveralls commented May 13, 2024

Pull Request Test Coverage Report for Build 9089131164

Details

  • 118 of 315 (37.46%) changed or added relevant lines in 25 files are covered.
  • 30 unchanged lines in 20 files lost coverage.
  • Overall coverage increased (+0.07%) to 78.6%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/operator/operator.go 0 1 0.0%
pkg/controllers/nodeclaim/lifecycle/controller.go 6 9 66.67%
pkg/controllers/nodepool/counter/controller.go 6 9 66.67%
pkg/controllers/disruption/controller.go 0 4 0.0%
pkg/controllers/disruption/orchestration/queue.go 0 4 0.0%
pkg/controllers/metrics/node/controller.go 0 4 0.0%
pkg/controllers/node/termination/terminator/eviction.go 0 4 0.0%
pkg/controllers/nodeclaim/garbagecollection/controller.go 1 5 20.0%
pkg/controllers/nodeclaim/termination/controller.go 11 15 73.33%
pkg/controllers/provisioning/provisioner.go 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/state/informer/daemonset.go 1 67.86%
pkg/controllers/state/informer/nodeclaim.go 1 74.07%
pkg/controllers/disruption/orchestration/queue.go 1 82.61%
pkg/controllers/state/informer/node.go 1 67.86%
pkg/controllers/state/informer/pod.go 1 61.29%
pkg/controllers/disruption/controller.go 1 76.5%
pkg/controllers/metrics/nodepool/controller.go 1 86.54%
pkg/controllers/metrics/node/controller.go 1 93.51%
pkg/controllers/node/termination/terminator/eviction.go 1 91.59%
pkg/controllers/nodeclaim/garbagecollection/controller.go 1 74.6%
Totals Coverage Status
Change from base Build 9085995680: 0.07%
Covered Lines: 8308
Relevant Lines: 10570

💛 - Coveralls

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 14, 2024
@jonathan-innis jonathan-innis marked this pull request as ready for review May 14, 2024 15:06
@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 May 14, 2024
pkg/controllers/controllers.go Outdated Show resolved Hide resolved
pkg/controllers/metrics/node/controller.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2024
@jonathan-innis jonathan-innis force-pushed the reconcile-as-reconciler branch 3 times, most recently from b0bae40 to 9c7d33b Compare May 15, 2024 02:15
Copy link
Member

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

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

@jonathan-innis Do you think this can be deferred until #1050 is landed? Because there are few of the knative logging being added here which is could be converted to runtime-logging as well.

@jonathan-innis
Copy link
Member Author

Do you think this can be deferred until #1050 is landed

Happy to rebase the changes from this PR onto that one so that we can drop the logger injection if this gets merged first @fmuyassarov

@jmdeal
Copy link
Member

jmdeal commented May 15, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 15, 2024
@k8s-ci-robot k8s-ci-robot merged commit f26918e into kubernetes-sigs:main May 15, 2024
12 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants