diff --git a/changelogs/unreleased/6315-ywk253100 b/changelogs/unreleased/6315-ywk253100 new file mode 100644 index 0000000000..d96d6c1fc3 --- /dev/null +++ b/changelogs/unreleased/6315-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 e067283307..66f8fbdd32 100644 --- a/pkg/cmd/server/server.go +++ b/pkg/cmd/server/server.go @@ -532,10 +532,13 @@ High priorities: - 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 Low priorities: - Tanzu ClusterBootstraps go last as it can reference any other kind of resources. - ClusterBootstraps go before CAPI Clusters otherwise a new default ClusterBootstrap object is created for the cluster + - ClusterBootstraps go before CAPI Clusters otherwise a new default ClusterBootstrap object is created for the cluster - CAPI Clusters come before ClusterResourceSets because failing to do so means the CAPI controller-manager will panic. Both Clusters and ClusterResourceSets need to come before ClusterResourceSetBinding in order to properly restore workload clusters. See https://github.com/kubernetes-sigs/cluster-api/issues/4105 @@ -561,6 +564,7 @@ var defaultRestorePriorities = restore.Priorities{ // in the backup. "replicasets.apps", "clusterclasses.cluster.x-k8s.io", + "endpoints", "services", }, LowPriorities: []string{