Skip to content

Add mesh expansion gateway#6896

Merged
costinm merged 9 commits intoistio:release-1.0from
costinm:10-gateway
Jul 9, 2018
Merged

Add mesh expansion gateway#6896
costinm merged 9 commits intoistio:release-1.0from
costinm:10-gateway

Conversation

@costinm
Copy link
Copy Markdown
Contributor

@costinm costinm commented Jul 6, 2018

Add an option for gateway to enable 2 additional ports. This must be set on a specific gateway - can be set for example on the ingress-gateway (to not waste an IP) or on a different one. ILB-type gateways
could do this - but separate PR.

In addition, a global option will enable the gateway and VirtualServices needed to connect to pilot and
citadel. The mesh expansion or multi-cluster must be setup with the IP of the ingress. For pilot, only mtls connections are exposed, for security reasons.

Along few cleanups and polish:

  • remote was out of sync with main config

  • if image has a "/", use it as a fully qualified name (as we do for the proxy annotation).
    It is not clear what was the purpose of image - we don't publish other pilot/mixer/etc images under istio/istio, so having it as an option to be composed with base hub and tag doesn't make sense.
    The image with / is currently enabled for grafana, pilot and initializer - each may require tweaking
    (grafana is currently broken, but previous version works, initializer needs to be tweaked for tproxy testing)

@costinm costinm requested a review from sdake July 6, 2018 21:49
@istio-testing
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: costinm

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@istio-testing istio-testing requested review from ayj and ijsnellf July 6, 2018 21:49
@costinm costinm requested review from rshriram and removed request for ayj and ijsnellf July 6, 2018 21:49
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 6, 2018

Codecov Report

Merging #6896 into release-1.0 will decrease coverage by 1%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release-1.0   #6896    +/-   ##
============================================
- Coverage           71%     71%   -<1%     
============================================
  Files              360     369     +9     
  Lines            31273   31648   +375     
============================================
+ Hits             22123   22374   +251     
- Misses            8275    8377   +102     
- Partials           875     897    +22
Impacted Files Coverage Δ
pilot/pkg/config/memory/monitor.go 82% <0%> (-9%) ⬇️
mixer/adapter/bypass/bypass.go 62% <0%> (-1%) ⬇️
mixer/adapter/bypass/util.go 7% <0%> (ø) ⬇️
pilot/pkg/kube/inject/inject.go 85% <0%> (ø) ⬇️
mixer/adapter/memquota/rollingWindow.go 100% <0%> (ø) ⬆️
pilot/pkg/kube/inject/initializer.go 100% <0%> (ø) ⬆️
mixer/adapter/memquota/dedup.go 100% <0%> (ø) ⬆️
mixer/adapter/solarwinds/solarwinds.go 0% <0%> (ø) ⬆️
galley/pkg/mcp/client/client.go
broker/pkg/platform/kube/crd/types.go 56% <0%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 426b63e...8a788eb. Read the comment docs.

Copy link
Copy Markdown
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

Wrong place to add ports.

- port: 8060
targetPort: 8060
name: tcp-citadel
{{- end }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to overload the gateway for this ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this works only with ilb why not have a separate ilb gateway instead of overloading consumer facing ingress gateway? Also this is not the right place to add ports. It’s in values.yaml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On the first question: somehow the gateway needs to listen on the port. We can add it in values.yaml, but it's harder for the user, we may have other boiler plage.

On the second: this is not based on ILB. We may add an ILB if anyone asks, but current solution is exposing mtls only and can be used on the regular gateway

Having a separate gateway is possible - that's why it's an option on the gateway, a user can add add more gateways and select to enable mesh expansion ports selectively.


# If set to true, the pilot and citadel mtls ports will be exposed on the ingress gateway
meshExpansion: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is where you should be adding these ports. I suggest creating a separate ingress-gateway-with-mesh-expansion that has same ports as ingress plus additional ports. Same service name as well.

This gateway should be disabled by default. Then in docs, you simply need to tell people to override the existing ingress gateway service with the new service (no changes to running gateway), add new servers to the gateway spec and so on. This keeps it cleaner and incremental, without having to add these ports to the templated spec.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Running 2 gateways is more expensive ( IP and LB cost ). Large users are likely to do that, but for dev and small developers we can't require that. The mesh expansion gateway is disabled by default (false). I am planning to add another ingress-gateway-ILB - this will get a separate internal IP - but since not everyone has access to ILBs the first priority is using a normal gateway.

Note that this change can be done without helm changes - it's using just standard API - but it just makes it easier for a user.

@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Jul 7, 2018

My intention is for users to be able to install mesh expansion without editing the values.yaml manually.
They need to override 2 settings:
--set global.meshExpansion=true and
either --set gateways.istio-ingressagateway.meshExpansion=true or
--set gateways.istio-ilbgateway.enabled=true if they want ILB type.
(the second is WIP since the first type is going to work everywhere )

# If set to true, the pilot and citadel mtls and the plain text pilot ports
# will be exposed on an internal gateway
meshExpansionILB: false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You don’t need these two.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why not ? How else can user control if they add or not the gateway (and expose pilot/ca) ?

name: tcp
nodePort: 31400
# Pilot and Citadel MTLS ports are enabled in gateway - but will only redirect
# to pilot/citadel if global.meshExpansion settings are enabled.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change comment to say that while ports are exposed by the service, routing will happen only after user adds gateway config and virtual service per tutorial.
This way we don’t need to tweak helm for ingress based mesh expansion. You can add or remove routing config to enable or disable mesh expansion.

# to pilot/citadel if global.meshExpansion settings are enabled.
- port: 15011
targetPort: 15011
name: tcp-pilot-grcp-tls
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo. grpc

Copy link
Copy Markdown
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

Typos and unused vars.

name: meshexpansion-pilot
spec:
hosts:
- "pilot.istio-system"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

istio-pilot.istio-system ?
I would also add more variants.. like istio-pilot.istio-system.svc.cluster.local

name: meshexpansion-ilb-citadel
spec:
hosts:
- "citadel.istio-system"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

istio-citadel

name: meshexpansion-citadel
spec:
hosts:
- "citadel.istio-system"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

istio-citadel

Copy link
Copy Markdown
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

wrong hostnames in virtual services

@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Jul 9, 2018 via email

@rshriram
Copy link
Copy Markdown
Member

rshriram commented Jul 9, 2018

There is no hostname stuff in the port match.. The authority match stuff goes into envoy's header match fields.. It doesn't get into the virtual host stuff.

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: meshexpansion-ilb-gatewa
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo

@costinm costinm merged commit bab2220 into istio:release-1.0 Jul 9, 2018
@baodongli baodongli mentioned this pull request Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants