Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Nov 4, 2024
1 parent 282a2c6 commit 1d23fde
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/tags/tagUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ func BuildClusterServiceFQNTag(clusterID string, namespace, serviceName string)
//
// cluster.metal-stack.io/id/namespace/service=<clusterid>/namespace/servicename
func IsMemberOfCluster(tag, clusterID string) bool {
if strings.HasPrefix(tag, t.ClusterID) && strings.Contains(tag, "="+clusterID+"/") {
return true
if strings.HasPrefix(tag, t.ClusterID) {
parts := strings.Split(tag, "=")
if len(parts) != 2 {
return false
}
if strings.HasPrefix(parts[1], clusterID) {
return true
}
}
return false
}

0 comments on commit 1d23fde

Please sign in to comment.