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

Add finalizer subcommand #172

Merged
merged 8 commits into from
Jan 10, 2024
Merged

Add finalizer subcommand #172

merged 8 commits into from
Jan 10, 2024

Conversation

Yuni-sa
Copy link
Contributor

@Yuni-sa Yuni-sa commented Nov 30, 2023

Iterates over all types of namespaced resources in the cluster (Including Custom Resources) check if they are in a terminating state by looking if they have a finalizer and a deletion timestamp, deletion of those resources is also supported by patching out the finalizer.

part of #117

this command is not added to the "all" command for future plans implementing a separate function for the supported resources after #167

@Yuni-sa Yuni-sa marked this pull request as draft November 30, 2023 15:49
@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2023

Codecov Report

Attention: 106 lines in your changes are missing coverage. Please review.

Comparison is base (15c865e) 46.33% compared to head (f3b3a3d) 45.87%.

Files Patch % Lines
pkg/kor/finalizers.go 37.50% 46 Missing and 4 partials ⚠️
pkg/kor/delete.go 50.87% 25 Missing and 3 partials ⚠️
pkg/kor/kor.go 0.00% 28 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
- Coverage   46.33%   45.87%   -0.46%     
==========================================
  Files          24       25       +1     
  Lines        2236     2413     +177     
==========================================
+ Hits         1036     1107      +71     
- Misses       1023     1122      +99     
- Partials      177      184       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Yuni-sa Yuni-sa marked this pull request as ready for review December 3, 2023 06:09
@Yuni-sa Yuni-sa marked this pull request as draft December 3, 2023 11:51
@Yuni-sa Yuni-sa marked this pull request as ready for review December 3, 2023 12:13
@yonahd
Copy link
Owner

yonahd commented Dec 11, 2023

@Yuni-sa is this ready for review?

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

Overall it looks good.
Can we support this in multi and all and merge the namespaces?
Maybe we can do it that way and then put finalizers as include finalizers flag or something like that?

WDYT?

@Yuni-sa
Copy link
Contributor Author

Yuni-sa commented Jan 2, 2024

Overall it looks good. Can we support this in multi and all and merge the namespaces? Maybe we can do it that way and then put finalizers as include finalizers flag or something like that?

WDYT?

Not sure if there is a good implementation of this without #167 , after reasoning will be added I will create a new pr that will include it in all and multi.

if we add this now it would probably all be deleted/changed in the next pr, I think the current implementation of using kor finalizers which also supports all of the filters options is fine for now.

@yonahd
Copy link
Owner

yonahd commented Jan 4, 2024

Overall it looks good. Can we support this in multi and all and merge the namespaces? Maybe we can do it that way and then put finalizers as include finalizers flag or something like that?
WDYT?

Not sure if there is a good implementation of this without #167 , after reasoning will be added I will create a new pr that will include it in all and multi.

if we add this now it would probably all be deleted/changed in the next pr, I think the current implementation of using kor finalizers which also supports all of the filters options is fine for now.

Ok.
Can you just add the command in the Readme and then we can merge it

@Yuni-sa Yuni-sa requested a review from yonahd January 10, 2024 08:29
Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks!

@yonahd yonahd merged commit a911793 into yonahd:main Jan 10, 2024
1 check passed
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