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: simplify deprovisioning controller and remove dead code #179

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

ellistarn
Copy link
Contributor

@ellistarn ellistarn commented Jan 27, 2023

Fixes #2021

Description

  • Nothing was using ResultRetry, which just became success/failed, which maps 1:1 with err being nil or not
  • Combined RecordLastState from individual deprovisioners into cluster state, which enabled the deprovisioning controller to be unaware of any specific subcontroller.

How was this change tested?

make test

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

@ellistarn ellistarn requested a review from a team as a code owner January 27, 2023 21:21
@ellistarn ellistarn marked this pull request as draft January 27, 2023 21:21
@ellistarn ellistarn changed the title feat: terminate nodes that have reported NotReady > ttlSecondsAfterNotReady feat: terminate nodes that fail to report readiness after a ttl Jan 27, 2023
@ellistarn ellistarn force-pushed the liveness branch 4 times, most recently from d504957 to 9c29f52 Compare January 27, 2023 22:10
@ellistarn ellistarn changed the title feat: terminate nodes that fail to report readiness after a ttl chore: simplify deprovisioning controller and remove dead code Jan 27, 2023
@coveralls
Copy link

coveralls commented Jan 27, 2023

Pull Request Test Coverage Report for Build 4057832925

  • 67 of 71 (94.37%) changed or added relevant lines in 10 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.3%) to 79.647%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/deprovisioning/controller.go 37 39 94.87%
pkg/controllers/state/cluster.go 13 15 86.67%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/deprovisioning/controller.go 1 76.54%
pkg/controllers/deprovisioning/types.go 1 88.89%
pkg/test/cachesyncingclient.go 2 73.91%
Totals Coverage Status
Change from base Build 4050137047: 0.3%
Covered Lines: 6371
Relevant Lines: 7999

💛 - Coveralls

@ellistarn ellistarn marked this pull request as ready for review January 27, 2023 22:33
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

Great cleanup! Just a few comments.

pkg/controllers/deprovisioning/helpers.go Outdated Show resolved Hide resolved
pkg/controllers/deprovisioning/controller.go Outdated Show resolved Hide resolved
pkg/controllers/deprovisioning/controller.go Outdated Show resolved Hide resolved
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ellistarn ellistarn merged commit 9cffa7e into kubernetes-sigs:main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants