From 487e4bb06e878f07424ffc49b8b1dddc97dd967e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wenkai=20Yin=28=E5=B0=B9=E6=96=87=E5=BC=80=29?= Date: Fri, 3 Jan 2025 14:49:16 +0800 Subject: [PATCH] Clear validation errors when schedule is valid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clear validation errors when schedule is valid Fixes #8571 Signed-off-by: Wenkai Yin(尹文开) --- changelogs/unreleased/8575-ywk253100 | 1 + pkg/controller/schedule_controller.go | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelogs/unreleased/8575-ywk253100 diff --git a/changelogs/unreleased/8575-ywk253100 b/changelogs/unreleased/8575-ywk253100 new file mode 100644 index 0000000000..30916f4e09 --- /dev/null +++ b/changelogs/unreleased/8575-ywk253100 @@ -0,0 +1 @@ +Clear validation errors when schedule is valid \ No newline at end of file diff --git a/pkg/controller/schedule_controller.go b/pkg/controller/schedule_controller.go index 4b89e98a3e..799a8c77a2 100644 --- a/pkg/controller/schedule_controller.go +++ b/pkg/controller/schedule_controller.go @@ -128,6 +128,7 @@ func (c *scheduleReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c schedule.Status.ValidationErrors = errs } else { schedule.Status.Phase = velerov1.SchedulePhaseEnabled + schedule.Status.ValidationErrors = nil } scheduleNeedsPatch := false