diff --git a/controllers/clustersummary_controller.go b/controllers/clustersummary_controller.go index c5772ab8..66fd782c 100644 --- a/controllers/clustersummary_controller.go +++ b/controllers/clustersummary_controller.go @@ -668,7 +668,6 @@ func (r *ClusterSummaryReconciler) proceedDeployingClusterSummary(ctx context.Co interval = kustomizeRefInterval } if interval > 0 { - r.setNextReconcileTime(clusterSummaryScope, interval) return reconcile.Result{RequeueAfter: interval}, nil } diff --git a/test/fv/remote_url_test.go b/test/fv/remote_url_test.go index 0df65ce3..ee29d8c3 100644 --- a/test/fv/remote_url_test.go +++ b/test/fv/remote_url_test.go @@ -46,12 +46,10 @@ var _ = Describe("Remote URL", func() { saName = "metrics-server" ) - // Extra Labels/Annotations are deprecated. Not supported in pull mode - // Do not run in PullMode. ExtraLabels/ExtraAnnotations are deprecated. So not implemented in pull mode. - It("Deploy the content of a remote URL", Label("FV", "EXTENDED"), func() { + It("Deploy the content of a remote URL", Label("FV", "PULLMODE", "EXTENDED"), func() { Byf("Create a ClusterProfile matching Cluster %s/%s", kindWorkloadCluster.GetNamespace(), kindWorkloadCluster.GetName()) clusterProfile := getClusterProfile(namePrefix, map[string]string{key: value}) - clusterProfile.Spec.SyncMode = configv1beta1.SyncModeContinuous + clusterProfile.Spec.SyncMode = configv1beta1.SyncModeContinuousWithDriftDetection Expect(k8sClient.Create(context.TODO(), clusterProfile)).To(Succeed()) verifyClusterProfileMatches(clusterProfile) @@ -125,6 +123,21 @@ var _ = Describe("Remote URL", func() { clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, libsveltosv1beta1.FeatureResources, policies, nil) + verifyDriftDetectionManagerDeployment(workloadClient) + + Byf("Deleting metric-server ServiceAccount %s/%s from the workload cluster", saNamespace, saName) + currentServiceAccount := &corev1.ServiceAccount{} + Expect(workloadClient.Get(context.TODO(), + types.NamespacedName{Namespace: saNamespace, Name: saName}, currentServiceAccount)).To(Succeed()) + Expect(workloadClient.Delete(context.TODO(), currentServiceAccount)).To(Succeed()) + + Byf("Verifying Sveltos redeploys metric-server ServiceAccount %s/%s after it is deleted", saNamespace, saName) + Eventually(func() error { + return workloadClient.Get(context.TODO(), + types.NamespacedName{Namespace: saNamespace, Name: saName}, + &corev1.ServiceAccount{}) + }, timeout, pollingInterval).Should(BeNil()) + Byf("Update ClusterProfile %s to not reference Remote URL", clusterProfile.Name) err = retry.RetryOnConflict(retry.DefaultRetry, func() error { Expect(k8sClient.Get(context.TODO(),