addon-controller icon indicating copy to clipboard operation
addon-controller copied to clipboard

BUG: Stale drift-detection pod

Open gianlucam76 opened this issue 2 years ago • 0 comments

Problem Description

When Sveltos is instructed to deploy agents (sveltos-agent and drift-detection-manager) in the management cluster following sequence leaves a stale drift-detection-manager in the management cluster:

  1. create a Profile/ClusterProfile with mode set to driftDetection
  2. have a cluster/sveltoscluster match => drift-detection-manager is created in the management cluster
  3. change cluster/sveltoscluster labels so it does not match any Profile/ClusterProfile anymore
  4. when all ClusterSummaries instances are gone, delete the cluster/sveltosCluster => drift-detection-manager is state

Reason is the cleanup of the drift-detection-manager happens within ClusterSummary reconciler if the cluster is gone or marked for deletion. But following above sequence, ClusterSummaries are all gone when cluster is deleted, so the stale drift-detection-manager deployment in the management cluster.

gianlucam76 avatar Jan 08 '24 16:01 gianlucam76