kargo
kargo copied to clipboard
Bug: Kargo Management Controller Cannot Set Owner for Namespace in OpenShift
Checklist
- [X] I've searched the issue queue to verify this is not a duplicate bug report.
- [X] I've included steps to reproduce the bug.
- [X] I've pasted the output of
kargo version
. - [X] I've pasted logs, if applicable.
Description
Creating a Kargo Project resource for a newly installed version of Kargo 0.8.7 on OpenShift 4.16 generates a permission error within the Kargo Management Controller. A namespace is created but the owner is not set to the Kargo Management Controller. This means that the namespace is not deleted when the Kargo Project resource is deleted.
Screenshots
Steps to Reproduce
- Create Kargo project.
- View logs in Kargo Management Controller pod.
Version
Kargo 0.8.7
Logs
time="2024-09-11T05:37:00Z" level=error msg="error syncing Project" error="error ensuring namespace: error patching namespace \"kargo-infrastructure-services\" with project \"kargo-infrastructure-services\" as owner: patch owner references: namespaces \"kargo-infrastructure-services\" is forbidden: cannot set an ownerRef on a resource you can't delete: , <nil>" project=kargo-infrastructure-services
time="2024-09-11T05:37:00Z" level=error msg="Reconciler error" Project="{kargo-infrastructure-services }" controller=project controllerGroup=kargo.akuity.io controllerKind=Project error="error ensuring namespace: error patching namespace \"kargo-infrastructure-services\" with project \"kargo-infrastructure-services\" as owner: patch owner references: namespaces \"kargo-infrastructure-services\" is forbidden: cannot set an ownerRef on a resource you can't delete: , <nil>" name=kargo-infrastructure-services namespace= reconcileID="\"c4e3131f-e4d3-4880-9d9a-0f94965750da\""