Description of the problem: I am following the steps to clean up or remove the assisted-service operator according to the destroy script in the assisted-service repo. https://github.com/openshift/assisted-service/blob/master/deploy/operator/destroy.sh the steps consist of deleting the namespace as the first step. Unfortunately it's not cleaning up an API service. The agentinstall api service is hanging around and preventing the operator to delete. The ns sits in a terminating state. This also affects cleanup or destroying RHACM bundled with AI. workaround before deleting namespace is to delete api service. oc delete apiservice v1.admission.agentinstall.openshift.io Release version: rhacm 2.5 + upstream operator Operator snapshot version: OCP version: Browser Info: Steps to reproduce: 1. Deploy assisted service operator with hive 2. Remove hive 3. try to remove assisted service operator namespace Actual results: Sits in terminating state Expected results: to remove all resources Additional info: work around: Issue this command before trying to delete namespace oc delete apiservice v1.admission.agentinstall.openshift.io
Are there any finalizers that you see on the resources?
Any update on the issue?
@bjacot any updates? Are there any finalizers that you see on the resources?
I see the traditional kubernetes finalizer. When i delete the operator shouldnt it clean up apiservice v1.admission.agentinstall.openshift.io? Its not doing that. If i manually remove that then i can delete.
Is it created on a default namespace or in the same namespace as the other components? If it's in a different namespace then it will make sense, after all you deleted the namespace that the operator is running on.| I don't see that the operator have any finalizers so it means that it doesn't handle cleanup, most of the resources are inside the namespace but if we put something in the a default namespace then it will not be removed. @mhrivnak maybe you know what should be the standard in this situation? Does an operator responsible for cleanup as well?
Looking at the code it looks like it's missing a controller reference controllerutil.SetControllerReference the same as any other reseource https://github.com/openshift/assisted-service/blob/8d81418a72d85143c1822df720877f6b6ea583d5/internal/controller/controllers/agentserviceconfig_controller.go#L1867 Maybe need to add it to https://github.com/openshift/assisted-service/blob/8d81418a72d85143c1822df720877f6b6ea583d5/internal/controller/controllers/agentserviceconfig_controller.go#L1890-L1913
*** Bug 2060134 has been marked as a duplicate of this bug. ***
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Red Hat Advanced Cluster Management 2.5 security updates, images, and bug fixes), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:4956
This comment was flagged a spam, view the edit history to see the original text if required.
Thanks for share this !! https://www.targetpayandbenefits.review/