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 <[email protected]>
  • Loading branch information
vinay-g authored and vinaygonuguntla committed Sep 4, 2024
1 parent 48084dc commit c3f90ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

run-integration-tests:
machine:
image: ubuntu-2004:202010-01
image: ubuntu-2004:2024.04.4
environment:
K8S_VERSION: v1.25.2
KUBECONFIG: /home/circleci/.kube/config
Expand Down
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 c3f90ff

Please sign in to comment.