k8ssandra / k8ssandra-operator

The Kubernetes operator for K8ssandra
https://k8ssandra.io/
Apache License 2.0
174 stars 79 forks source link

Reaper deployment can't be created on OpenShift #1366

Closed adejanovski closed 3 months ago

adejanovski commented 4 months ago

When trying to deploy a K8ssandraCluster object on OpenShift, we get the following error during the reconcile of Reaper resources:

2024-07-09T10:06:11.259Z    INFO    Reconciling reaper deployment   {"controller": "reaper", "controllerGroup": "reaper.k8ssandra.io", "controllerKind": "Reaper", "Reaper": {"name":"test-dc1-reaper","namespace":"test-3d4qb141"}, "namespace": "test-3d4qb141", "name": "test-dc1-reaper", "reconcileID": "3d10d6b6-b66f-421f-be2b-71b7b557076c", "Reaper": {"name":"test-dc1-reaper","namespace":"test-3d4qb141"}, "Deployment": {"name":"test-dc1-reaper","namespace":"test-3d4qb141"}, "actualReaper": {"apiVersion": "reaper.k8ssandra.io/v1alpha1", "kind": "Reaper", "namespace": "test-3d4qb141", "name": "test-dc1-reaper"}}
2024-07-09T10:06:11.290Z    ERROR   Failed to create Reaper Deployment  {"controller": "reaper", "controllerGroup": "reaper.k8ssandra.io", "controllerKind": "Reaper", "Reaper": {"name":"test-dc1-reaper","namespace":"test-3d4qb141"}, "namespace": "test-3d4qb141", "name": "test-dc1-reaper", "reconcileID": "3d10d6b6-b66f-421f-be2b-71b7b557076c", "Reaper": {"name":"test-dc1-reaper","namespace":"test-3d4qb141"}, "Deployment": {"name":"test-dc1-reaper","namespace":"test-3d4qb141"}, "error": "deployments.apps \"test-dc1-reaper\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>"}
github.com/k8ssandra/k8ssandra-operator/controllers/reaper.(*ReaperReconciler).reconcileDeployment
    /workspace/controllers/reaper/reaper_controller.go:209
github.com/k8ssandra/k8ssandra-operator/controllers/reaper.(*ReaperReconciler).reconcile
    /workspace/controllers/reaper/reaper_controller.go:101
github.com/k8ssandra/k8ssandra-operator/controllers/reaper.(*ReaperReconciler).Reconcile
    /workspace/controllers/reaper/reaper_controller.go:78
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
    /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.5/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
    /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.5/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.5/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
    /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.5/pkg/internal/controller/controller.go:227

This never allows the Reaper Deployment to be created.