-
Notifications
You must be signed in to change notification settings - Fork 82
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
Cleanup legacy OLM Subscription & CSVs #1282
Cleanup legacy OLM Subscription & CSVs #1282
Conversation
Got this link from Joe today: https://github.com/operator-framework/kubectl-operator/blob/ddb2132976fa3e0ca5da63915c29c77b9240da70/internal/pkg/action/operator_uninstall.go#L186-L242 which may help us improve this further |
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.
Very nice feature considering how we're changing the installation process. Makes users life much easier.
Looks ok to me. What are the leftover "operator" resources? |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/8792d2b1fecf48c6a9edbb1ba9e8cdfa ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 19m 23s |
5e2c837
to
ccb4c8d
Compare
oc get operator |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/cfbc782bfd7b4920820bbd4a898aa6d2 ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 49m 26s |
recheck |
/test openstack-operator-build-deploy-kuttl |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/e4c063dbf7274000990415b9496233b0 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 18m 54s |
recheck |
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/ceefaeaa50c74f089daded35a9a2fe04 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 02m 04s |
recheck |
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.
/lgtm
/test precommit-check |
This cleans up legacy resources installed by OLM dependencies in old releases by searching for specifically named resources. This PR uses the unstructured client so that we don't have to import structs (and dependencies). NOTE: This PR does not yet address the leftover 'operator' resources which persist and seem to get recreated even if removed.
This will allow cleanup of 'operator' objects which own these resources and got created by service operators prior to FR2
The operator resource's have references to: -CSVs -Subscriptions -Installplans -CRDs So the cleanup for operators needs to run after applyCRDs where 'olm.managed' gets removed.
The horizon operator CR has references to an old Role/Binding. This code will cleanup those objects before attempting to delete the operator and requeue. On 2nd attempt the role/binding refs should have time to delete and the final reconcile will complete.
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abays, dprince, stuggi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test openstack-operator-build-deploy-kuttl |
3 similar comments
/test openstack-operator-build-deploy-kuttl |
/test openstack-operator-build-deploy-kuttl |
/test openstack-operator-build-deploy-kuttl |
fae8f3b
into
openstack-k8s-operators:main
This cleans up legacy resources installed by OLM dependencies in old releases by searching for specifically named resources.
This PR uses the unstructured client so that we don't have to import structs (and dependencies).