fix: Add operator driven cleanup for unsupported KAM resources#1106
fix: Add operator driven cleanup for unsupported KAM resources#1106tzprograms wants to merge 1 commit intoredhat-developer:masterfrom
Conversation
Signed-off-by: Tejas Soham <tejassoham05@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @tzprograms. Thanks for your PR. I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind cleanup
What does this PR do / why we need it:
KAM support was removed in
Openshift-Gitops 1.15, While manual cleanup steps were documented in the release notes, many users missed these instructions and continue running outdated , unsupported KAM components in their environments , this caused the stale resources which were remaining on many clusters causing CVE scan alerts and causing support burden .Approach:
Get+Deletefor the known KAM Deployment, Service and Route in theopenshift-gitopsnamespace.Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Test acceptance criteria:
How to test changes / Special notes to the reviewer:
Run the unit tests locally:
go test ./controllers/ -run "TestCleanKAMResources" -v6 tests cover the following scenarios:
Manual/E2E Validation
To verify on a live cluster
openshift-gitopsnamespace:kubectl create deployment kam --image=nginx -n openshift-gitopskubectl create service clusterip kam --tcp=80:80 -n openshift-gitopskubectl get deployment kam -n openshift-gitopskubectl get service kam -n openshift-gitopskubectl get route kam -n openshift-gitopsNotes