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

feat(kuma-cp): unsafe delete #4136

Merged
merged 3 commits into from
Apr 7, 2022
Merged

feat(kuma-cp): unsafe delete #4136

merged 3 commits into from
Apr 7, 2022

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

Add ability to delete resources unsafe way. Why?

  • With tests we don't want to wait for all Dataplane object to be deleted, we just want to delete Mesh and forget about the rest
  • On prod, we may get into an undefined state in which you may want to bypass validators. On Kubernetes you can always remove the webhook temporarily, on universal there is no such thing.

I was considering supporting this on Validator level, but I believe this is the responsibility of manager/webhook rather than validator. You should be able to swap a validator without worrying about this flag.

Documentation

- [ ] Link to the website documentation PR

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

- [ ] Update UPGRADE.md with any steps users will need to take when upgrading.
- [ ] Add backport-to-stable label if the code follows our backporting policy

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner April 6, 2022 11:25
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Merging #4136 (83b4c15) into master (9bd255f) will decrease coverage by 0.00%.
The diff coverage is 62.50%.

❗ Current head 83b4c15 differs from pull request most recent head 8fbb3a5. Consider uploading reports for the commit 8fbb3a5 to get more accurate results

@@            Coverage Diff             @@
##           master    #4136      +/-   ##
==========================================
- Coverage   55.77%   55.76%   -0.01%     
==========================================
  Files         932      932              
  Lines       56230    56257      +27     
==========================================
+ Hits        31361    31374      +13     
- Misses      22391    22403      +12     
- Partials     2478     2480       +2     
Impacted Files Coverage Δ
pkg/config/core/resources/store/config.go 65.11% <ø> (ø)
pkg/plugins/runtime/k8s/plugin.go 1.06% <0.00%> (-0.01%) ⬇️
pkg/plugins/runtime/k8s/webhooks/mesh_validator.go 0.00% <0.00%> (ø)
pkg/plugins/runtime/k8s/webhooks/zone_validator.go 0.00% <0.00%> (ø)
pkg/core/secrets/manager/manager.go 37.33% <62.50%> (+0.34%) ⬆️
pkg/core/bootstrap/bootstrap.go 68.01% <100.00%> (+0.77%) ⬆️
pkg/core/managers/apis/mesh/mesh_manager.go 48.19% <100.00%> (+1.27%) ⬆️
pkg/core/managers/apis/zone/zone_manager.go 85.71% <100.00%> (+10.71%) ⬆️
...g/plugins/runtime/k8s/webhooks/secret_validator.go 76.31% <100.00%> (+0.64%) ⬆️
pkg/test/runtime/runtime.go 84.21% <100.00%> (+1.60%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bd255f...8fbb3a5. Read the comment docs.

Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

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

lgtm

pkg/core/managers/apis/mesh/mesh_manager_test.go Outdated Show resolved Hide resolved
pkg/core/secrets/manager/manager.go Show resolved Hide resolved
Co-authored-by: Bart Smykla <bartek@smykla.com>
@jakubdyszkiewicz jakubdyszkiewicz merged commit fd289f1 into master Apr 7, 2022
@jakubdyszkiewicz jakubdyszkiewicz deleted the feat/unsafe-delete branch April 7, 2022 11:30
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.

None yet

4 participants