Skip to content

Commit

Permalink
fix(platform): allow global to be the cluster name (tkestack#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangao1236 committed Dec 17, 2020
1 parent a758142 commit 542aee9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/platform/registry/cluster/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ func (s *FinalizeStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.
}

func CorrectClusterName(clusterName string) string {
if clusterName == "global" {
return clusterName
}
if !strings.HasPrefix(clusterName, NamePrefix) {
return ""
}
Expand Down

0 comments on commit 542aee9

Please sign in to comment.