diff --git a/pkg/router/gloo.go b/pkg/router/gloo.go index 4972b927..519a4a1d 100644 --- a/pkg/router/gloo.go +++ b/pkg/router/gloo.go @@ -170,9 +170,8 @@ func (gr *GlooRouter) GetRoutes(canary *flaggerv1.Canary) ( mirrored bool, err error, ) { - apexName := canary.Spec.TargetRef.Name - primaryName := fmt.Sprintf("%s-%s-primaryupstream-%v", canary.Namespace, canary.Spec.TargetRef.Name, canary.Spec.Service.Port) - + apexName, _, _ := canary.GetServiceNames() + primaryUpstreamName := fmt.Sprintf("%s-%s-primaryupstream-%v", canary.Namespace, apexName, canary.Spec.Service.Port) routeTable, err := gr.glooClient.GatewayV1().RouteTables(canary.Namespace).Get(context.TODO(), apexName, metav1.GetOptions{}) if err != nil { err = fmt.Errorf("RouteTable %s.%s get query error: %w", apexName, canary.Namespace, err) @@ -185,7 +184,7 @@ func (gr *GlooRouter) GetRoutes(canary *flaggerv1.Canary) ( } for _, dst := range routeTable.Spec.Routes[0].Action.Destination.Destinations { - if dst.Destination.Upstream.Name == primaryName { + if dst.Destination.Upstream.Name == primaryUpstreamName { primaryWeight = int(dst.Weight) canaryWeight = 100 - primaryWeight return diff --git a/test/gloo/install.sh b/test/gloo/install.sh index ebf7e853..cf39037e 100755 --- a/test/gloo/install.sh +++ b/test/gloo/install.sh @@ -2,7 +2,7 @@ set -o errexit -GLOO_VER="1.11.13" +GLOO_VER="1.12.31" REPO_ROOT=$(git rev-parse --show-toplevel) mkdir -p ${REPO_ROOT}/bin @@ -15,7 +15,6 @@ helm upgrade -i gloo gloo/gloo --version ${GLOO_VER} \ --set discovery.enabled=false kubectl -n gloo-system rollout status deployment/gloo -kubectl -n gloo-system rollout status deployment/gateway kubectl -n gloo-system get all echo '>>> Installing Flagger'