cryostatio / cryostatio/cryostat-operator

Users should not need to delete CRs before uninstalling operator

Open
#238 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
37
Forks
22
Avg merge
21h 37m
Merged PRs (30d)
22

Description

Right now, if the user uninstalls the operator before deleting Cryostat or Recording CRs, the operator deployment may be deleted before it has a chance to finalize those CRs. Any attempt to delete those CRs or their CRD will hang indefinitely, until the user manually edits the CRs to remove the finalizers.

controller-runtime has a somewhat new graceful shutdown mechanism that could potentially give the Cryostat and Recording controllers enough time to finalize these CRs: https://github.com/kubernetes-sigs/controller-runtime/issues/764. Another issue I encountered when trying something similar in the past is that the RBAC for the operator is revoked too soon by OLM, thus the controllers are unable to do anything meaningful with the API server. Once https://github.com/operator-framework/operator-lifecycle-manager/issues/2235 is fixed, we can take another look at this.

It's also worth mentioning that if we plan to move to a cluster-scoped CRD, then the Cryostat finalizer would no longer be needed as it would be capable of owning cluster-scoped objects. Then those objects would be deleted by garbage collection instead of requiring the controller to delete them manually.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked controller-runtime graceful-shutdown issue and the OLM RBAC issue to determine whether either dependency is resolved. Then examine how the Cryostat and Recording CR finalizers behave during operator uninstall, including the possible move to cluster-scoped CRDs. Done means CRs and their owned resources can be removed without manual finalizer edits after uninstall.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.