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

fix(kuma-cp) ingress per cluster (not per mesh) #881

Merged
merged 10 commits into from
Jul 7, 2020

Conversation

lobkovilya
Copy link
Contributor

@lobkovilya lobkovilya commented Jul 3, 2020

Summary

This PR fixes the limitation that we currently have. Instead of having ingress per mesh, we will have ingress per cluster.
In order to achieve it we do the following things:

  1. During reconcile of available services, we also add mesh for each service. I did it using tags, but that also could be a separate field if needed. So now availableServices looks like this:
availableServices:
  - tags:
       mesh: kuma-demo
       service: backend
       version: v2
    instances: 1
  - tags:
       mesh: banking
       service: payments
       version: v1
    instances: 1
  1. During resource generation for Envoy we split one multi-mesh Ingress into several Ingresses each of them has available services just for the single mesh. It is needed to do only minor changes in the code that generates outbounds. So ingress above will be split into:
mesh: kuma-demo
type: Dataplane
name: ingress
networking:
  ingress:
    availableServices:
      - tags:
           mesh: kuma-demo
           service: backend
           version: v2
         instances: 1

and

mesh: banking
type: Dataplane
name: ingress
networking:
  ingress:
    availableServices:
      - tags:
           mesh: banking
           service: payment
           version: v1
         instances: 1
  1. When generate outboundTargets, endpoints should match Tags from Destination map. In order to do it, Endpoints should have tag mesh as well.

  2. Tag mesh should also be a part of SNI.

Full changelog

  • Multi-mesh Ingress
  • This PR also has a couple of tests not related to Ingress, they were omitted during KDS implementation

Issues resolved

Fix #835

Documentation

@lobkovilya lobkovilya requested a review from a team July 3, 2020 03:27
Copy link
Contributor

@nickolaev nickolaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insignificant nits on my side. Overall looks good.

app/kumactl/cmd/install/install_ingress.go Outdated Show resolved Hide resolved
pkg/kds/cache/snapshot.go Outdated Show resolved Hide resolved
pkg/kds/remote/components_test.go Outdated Show resolved Hide resolved
pkg/xds/generator/outbound_proxy_generator.go Outdated Show resolved Hide resolved
pkg/xds/server/components.go Outdated Show resolved Hide resolved
@lobkovilya lobkovilya force-pushed the feat/ingress-multi-mesh branch from d3c770d to cfe9096 Compare July 7, 2020 17:38
@lobkovilya lobkovilya merged commit 7b34d14 into master Jul 7, 2020
@lobkovilya lobkovilya deleted the feat/ingress-multi-mesh branch July 29, 2020 13:59
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

Successfully merging this pull request may close these issues.

Ingress multi mesh support
3 participants