Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColorApp Question: What's the purpose of the colorgateway VirtualService #113

Closed
eeeschwartz opened this issue Dec 14, 2019 · 2 comments
Closed

Comments

@eeeschwartz
Copy link
Contributor

As a new App Mesh user, I spend a lot of time poring over the ColorApp example. I'm struggling to understand the purpose of the colorgateway VirtualService.

It seems that VirtualService routes are only relevant for communication between VirtualNodes within a mesh. Correct so far?

In this case, why define a VirtualService for the colorgateway since it only receives traffic from outside of the mesh. At least that's how it's described in the EKS walkthrough in the aws-app-mesh-examples repo. The curler pod makes requests to the colorgateway from outside of the mesh (i.e. it's deployed without an exposed port so no sidecar; also doesn't define a VirtualNode).

When you kubectl exec curler-dc65c8c79-zbtkb -- curl colorgateway:9080/color, the VirtualService config does not have an effect. For instance, I changed it to route traffic to some-other-virtual-node but it had no effect:

apiVersion: appmesh.k8s.aws/v1beta1
kind: VirtualService
metadata:
  name: colorgateway.appmesh-demo
  namespace: appmesh-demo
spec:
  meshName: color-mesh
  virtualRouter:
    listeners:
      - portMapping:
          port: 9080
          protocol: http
  routes:
    - name: gateway-route
      http:
        match:
          prefix: /color
        action:
          weightedTargets:
            - virtualNodeName: some-other-virtual-node
              weight: 1

kubectl exec curler-dc65c8c79-zbtkb -- curl colorgateway:9080/color still routed to the colorgateway service as before.

Please let me know what I'm missing. Thanks in advance.

@kiranmeduri
Copy link
Collaborator

You are right, it is not needed and can be dropped.

@lavignes
Copy link
Contributor

It looks like this issue can be closed. Feel free to re-open it if you need more clarification on this topic. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants