From 292b3d52aa52e32dc3764cef62f04c5f23620918 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: Mon, 29 May 2023 10:17:08 +0800 Subject: [PATCH] Restore Endpoints before Services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restore Endpoints before Services Fixes #6280 Signed-off-by: Wenkai Yin(尹文开) --- changelogs/unreleased/6317-ywk253100 | 1 + pkg/cmd/server/server.go | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelogs/unreleased/6317-ywk253100 diff --git a/changelogs/unreleased/6317-ywk253100 b/changelogs/unreleased/6317-ywk253100 new file mode 100644 index 0000000000..d96d6c1fc3 --- /dev/null +++ b/changelogs/unreleased/6317-ywk253100 @@ -0,0 +1 @@ +Restore Endpoints before Services \ No newline at end of file diff --git a/pkg/cmd/server/server.go b/pkg/cmd/server/server.go index ba8b5685be..600866fc17 100644 --- a/pkg/cmd/server/server.go +++ b/pkg/cmd/server/server.go @@ -508,6 +508,7 @@ func (s *server) veleroResourcesExist() error { // - Replica sets go before deployments/other controllers so they can be explicitly // restored and be adopted by controllers. // - CAPI ClusterClasses go before Clusters. +// - Endpoints go before Services so no new Endpoints will be created // - Services go before Clusters so they can be adopted by AKO-operator and no new Services will be created // for the same clusters // @@ -538,6 +539,7 @@ var defaultRestorePriorities = restore.Priorities{ // in the backup. "replicasets.apps", "clusterclasses.cluster.x-k8s.io", + "endpoints", "services", }, LowPriorities: []string{