use name.namespace instead of namespace.name

This commit is contained in:
Yuval Kohavi
2019-04-25 11:10:23 -04:00
parent d196bb2856
commit 5279f73c17
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
- checkout
- run: test/e2e-kind.sh
- run: test/e2e-supergloo.sh
- run: test/e2e-build.sh supergloo:supergloo-system.test
- run: test/e2e-build.sh supergloo:test.supergloo-system
- run: test/e2e-tests.sh canary
workflows:
+3 -3
View File
@@ -52,14 +52,14 @@ func NewSuperglooRouter(ctx context.Context, provider string, flaggerClient clie
// remove the supergloo: prefix
provider = strings.TrimPrefix(provider, "supergloo:")
// split namespace.name :
// split name.namespace:
parts := strings.Split(provider, ".")
if len(parts) != 2 {
return nil, fmt.Errorf("invalid format for supergloo provider")
}
targetMesh := solokitcore.ResourceRef{
Namespace: parts[0],
Name: parts[1],
Namespace: parts[1],
Name: parts[0],
}
return NewSuperglooRouterWithClient(ctx, routingRuleClient, targetMesh, logger), nil
}