Skip to content

Commit

Permalink
[MESH-3865] - Update variable name
Browse files Browse the repository at this point in the history
Signed-off-by: vinay-g <vinayg99@gmail.com>
  • Loading branch information
vinay-g authored and vinaygonuguntla committed Aug 28, 2024
1 parent 48084dc commit 876766a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions admiral/pkg/controller/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,22 +703,22 @@ func GetMeshPortsHelper(meshPorts string, destService *k8sV1.Service, clusterNam
return ports
}

func GenerateUniqueNameForVS(syncNamespace string, vsName string) string {
func GenerateUniqueNameForVS(originNamespace string, vsName string) string {

if syncNamespace == "" && vsName == "" {
if originNamespace == "" && vsName == "" {
return ""
} else if syncNamespace == "" {
} else if originNamespace == "" {
return vsName
} else if vsName == "" {
return syncNamespace
return originNamespace
}

newVSName := syncNamespace + "-" + vsName
newVSName := originNamespace + "-" + vsName
if len(newVSName) > 250 {
newVSName = newVSName[:250]
}
//"op=%v type=%v name=%v namespace=%s cluster=%s message=%v"
logrus.Debugf(LogFormatAdv, "VirtualService", newVSName, syncNamespace, "", "New VS name generated")
logrus.Debugf(LogFormatAdv, "VirtualService", newVSName, originNamespace, "", "New VS name generated")

return newVSName

Expand Down

0 comments on commit 876766a

Please sign in to comment.