rhobs / rhobs/observability-operator
Clusterscoped resources are not cleaned up when monitoring-stack is deleted
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 51
- Forks
- 90
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 22
Description
OwnerReferences do not work across namespaces and it equally applies to cluster-scoped resources
See: https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/#owner-references-in-object-specifications
Cluster-scoped dependents can only specify cluster-scoped owners. In v1.20+, if a cluster-scoped dependent specifies a namespaced kind as an owner, it is treated as having an unresolvable owner reference, and is not able to be garbage collected.
Thus deleting the monitoring-stack will not delete the cluster-roles it creates. A workaround for it is to use finalizers on monitoring-stack and get the reconciler to delete clusterscoped resources before removing the finalizer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the monitoring-stack reconciler and its handling of finalizers and cluster-scoped resources. Verify how cluster roles are created and what happens when the monitoring-stack is deleted. Done means the reconciler removes those cluster-scoped resources before allowing deletion, with tests covering cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100