yonahd / kor

A Golang Tool to discover unused Kubernetes Resources
MIT License
1.04k stars 96 forks source link

BUG(delete): "-DELETED" suffix is not added in deletion output #322

Closed doronkg closed 4 months ago

doronkg commented 4 months ago

Describe the bug When using the --delete flag to remove unused resources, and running it successfully, the output displays all the unused resources the batch prior to the deletion, instead of appending -DELETED suffix to their names upon deletion.

To Reproduce Use --delete flag to remove resources review deletion output.

Expected behavior The -DELETED suffix will be appended to the deleted resources' names upon deletion and be displayed in output.

Screenshots

$ .\main.exe clusterrole --delete
Do you want to delete ClusterRole aaa in namespace ? (Y/N): Y
Deleting ClusterRole aaa in namespace
kor version: vdev

  _  _____  ____
 | |/ / _ \|  _ \
 | ' / | | | |_) |
 | . \ |_| |  _ <
 |_|\_\___/|_| \_\

Unused resources in namespace: ""
+---+---------------+---------------+
| # | RESOURCE TYPE | RESOURCE NAME |
+---+---------------+---------------+
| 1 | ClusterRole   | aaa           |
+---+---------------+---------------+

OS version, architecture and kor version e.g. Windows 10 Kor version: 0.5.1

Additional context Add any other context about the problem here.

doronkg commented 4 months ago

/assign WIP in #323