Restore Services before Clusters

Restore Services before Clusters so they can be adopted by AKO-operator and no new Services will be created for the same clusters

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
pull/6057/head
Wenkai Yin(尹文开) 2023-03-31 14:21:53 +08:00
parent b428b09a78
commit cccbd2f8c0
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1 @@
Restore Services before Clusters

View File

@ -513,6 +513,9 @@ 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.
// - 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.
@ -541,6 +544,7 @@ var defaultRestorePriorities = restore.Priorities{
// in the backup.
"replicasets.apps",
"clusterclasses.cluster.x-k8s.io",
"services",
},
LowPriorities: []string{
"clusterbootstraps.run.tanzu.vmware.com",