Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions internal/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func (d *Deployer) deleteCentralResources(ctx context.Context) error {
for _, resource := range []ResourceToDelete{
{Name: "central-db", Kind: "pvc"},
{Name: "central-db-backup", Kind: "pvc"},
// scanner-v4-db is not managed by the operator's ReconcilePVCExtension, so its ownerReference
// is only cleaned up by K8s GC. On redeploy, GC may not finish before the new CR is created,
// leaving a stale ownerReference that causes the operator to error-loop. See #291.
{Name: "scanner-v4-db", Kind: "pvc", OwnerName: centralCrName},
{Name: "admin-password", Kind: "secret"},
{Name: "scanner-db-password", Kind: "secret", OwnerName: centralCrName},
{Name: "stackrox-central-helm", Kind: "configmap"},
Expand Down Expand Up @@ -177,6 +181,10 @@ func (d *Deployer) deleteSecuredClusterResources(ctx context.Context) error {
// Delete resources, which are treated special.
for _, resource := range []ResourceToDelete{
{Name: "cluster-registration-secret", Kind: "secret"},
// scanner-v4-db is not managed by the operator's ReconcilePVCExtension, so its ownerReference
// is only cleaned up by K8s GC. On redeploy, GC may not finish before the new CR is created,
// leaving a stale ownerReference that causes the operator to error-loop. See #291.
{Name: "scanner-v4-db", Kind: "pvc", OwnerName: securedClusterCrName},
// We need to make sure that don't accidentally delete a scanner-db-password belonging to the central CR,
// when both are deployed into the same namespace.
{Name: "scanner-db-password", Kind: "secret", OwnerName: securedClusterCrName},
Expand Down
Loading