Skip to content

Commit

Permalink
Restore Endpoints before Services (#6316)
Browse files Browse the repository at this point in the history
Restore Endpoints before Services

Fixes #6280

Signed-off-by: Wenkai Yin(尹文开) <[email protected]>
  • Loading branch information
ywk253100 authored Jun 20, 2023
1 parent f33ea37 commit 286db70
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/6316-ywk253100
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restore Endpoints before Services
6 changes: 5 additions & 1 deletion pkg/cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,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
Expand All @@ -543,6 +546,7 @@ var defaultRestorePriorities = restore.Priorities{
// in the backup.
"replicasets.apps",
"clusterclasses.cluster.x-k8s.io",
"endpoints",
"services",
},
LowPriorities: []string{
Expand Down
2 changes: 1 addition & 1 deletion pkg/uploader/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func NewUploaderProvider(
log logrus.FieldLogger,
) (Provider, error) {
if credGetter.FromFile == nil {
return nil, errors.New("uninitialized FileStore credentail is not supported")
return nil, errors.New("uninitialized FileStore credential is not supported")
}
if uploaderType == uploader.KopiaType {
// We use the hardcode repositoryType velerov1api.BackupRepositoryTypeKopia for now, because we have only one implementation of unified repo.
Expand Down

0 comments on commit 286db70

Please sign in to comment.