-
Notifications
You must be signed in to change notification settings - Fork 30
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: Split resource deletion #1336
Conversation
1bfb5c5
to
631dfc5
Compare
…cking-deletion-mode
3b33d9f
to
1ba56fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good opportunity to increase unit test coverage.
There is no internal/pkg/resources/cleanup_test.go. Let's add these and also lock this pkg in unit-test-coverage.yaml
!
May be a bit of work and refactoring needed, and also concurrency involved internally, so not super trivial, but we agreed to increase the coverage.
tests/moduletemplates/moduletemplate_template_operator_v1_regular.yaml
Outdated
Show resolved
Hide resolved
9f908f3
to
458bbef
Compare
enhance e2e to test module deletion when managed CR get blocked
458bbef
to
60aff34
Compare
# Conflicts: # tests/e2e/utils_test.go
310ad2f
to
01de87c
Compare
084ea36
to
6f572d3
Compare
520c8a8
to
fe9502a
Compare
1f19806
to
34ef28c
Compare
34ef28c
to
c754ee9
Compare
related issue: #1281
This PR address above issue by split diff resource during deletion, it trying to delete resources managed by module operator first, after those managed resources are deleted, then LM start to delete operator-related resources, e.g:
ServiceAccount
,Role
,ClusterRole
,RoleBinding
,ClusterRoleBinding
. to ensure the module operator not being affected during deletion.