diff --git a/api/platform/types.go b/api/platform/types.go index 568dcf1ba..12a41cd33 100644 --- a/api/platform/types.go +++ b/api/platform/types.go @@ -330,6 +330,8 @@ const ( ClusterUpscaling ClusterPhase = "Upscaling" // ClusterDownscaling means the cluster is undergoing graceful down scaling. ClusterDownscaling ClusterPhase = "Downscaling" + // ClusterRecovering means the cluster is recovering form confined. + ClusterRecovering ClusterPhase = "Recovering" ) // ComponentPhase defines the phase of anywhere cluster component diff --git a/api/platform/v1/types.go b/api/platform/v1/types.go index 8effd575d..5d52fae2c 100644 --- a/api/platform/v1/types.go +++ b/api/platform/v1/types.go @@ -345,6 +345,8 @@ const ( ClusterUpscaling ClusterPhase = "Upscaling" // ClusterDownscaling means the cluster is undergoing graceful down scaling. ClusterDownscaling ClusterPhase = "Downscaling" + // ClusterRecovering means the cluster is recovering form confined. + ClusterRecovering ClusterPhase = "Recovering" ) // ComponentPhase defines the phase of anywhere cluster component diff --git a/pkg/platform/controller/cluster/cluster_controller.go b/pkg/platform/controller/cluster/cluster_controller.go index 7f7095ebe..3ad6a50e6 100644 --- a/pkg/platform/controller/cluster/cluster_controller.go +++ b/pkg/platform/controller/cluster/cluster_controller.go @@ -358,7 +358,7 @@ func (c *Controller) reconcile(ctx context.Context, key string, cluster *platfor err = c.onUpdate(ctx, cluster) case platformv1.ClusterUpscaling, platformv1.ClusterDownscaling: err = c.onUpdate(ctx, cluster) - case platformv1.ClusterIdling, platformv1.ClusterConfined: + case platformv1.ClusterIdling, platformv1.ClusterConfined, platformv1.ClusterRecovering: err = c.onUpdate(ctx, cluster) case platformv1.ClusterTerminating: log.FromContext(ctx).Info("Cluster has been terminated. Attempting to cleanup resources") @@ -444,7 +444,8 @@ func (c *Controller) onUpdate(ctx context.Context, cluster *platformv1.Cluster) if clusterWrapper.Status.Phase == platformv1.ClusterRunning || clusterWrapper.Status.Phase == platformv1.ClusterFailed || clusterWrapper.Status.Phase == platformv1.ClusterIdling || - clusterWrapper.Status.Phase == platformv1.ClusterConfined { + clusterWrapper.Status.Phase == platformv1.ClusterConfined || + clusterWrapper.Status.Phase == platformv1.ClusterRecovering { err = provider.OnUpdate(ctx, clusterWrapper) clusterWrapper = c.checkHealth(ctx, clusterWrapper) if err != nil {