Skip to content

Commit

Permalink
Merge pull request #141 from weaveworks/default-mesh
Browse files Browse the repository at this point in the history
Set default mesh gateway only if no gateway is specified
  • Loading branch information
stefanprodan authored Apr 8, 2019
2 parents 2cd3fe4 + 88ad457 commit db673dd
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- podinfo.example.com
Expand Down
1 change: 1 addition & 0 deletions artifacts/ab-testing/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- abtest.istio.weavedx.com
Expand Down
1 change: 1 addition & 0 deletions artifacts/canaries/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- app.istio.weavedx.com
Expand Down
1 change: 1 addition & 0 deletions artifacts/configs/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- app.iowa.weavedx.com
Expand Down
2 changes: 2 additions & 0 deletions docs/gitbook/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- podinfo.example.com
Expand Down Expand Up @@ -122,6 +123,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- frontend.example.com
Expand Down
1 change: 1 addition & 0 deletions docs/gitbook/usage/ab-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- app.example.com
Expand Down
1 change: 1 addition & 0 deletions docs/gitbook/usage/progressive-delivery.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ spec:
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
# Istio virtual service host names (optional)
hosts:
- app.example.com
Expand Down
4 changes: 3 additions & 1 deletion pkg/router/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func (ir *IstioRouter) Reconcile(canary *flaggerv1.Canary) error {
break
}
}
if !hasMeshGateway {

// set default mesh gateway if no gateway is specified
if !hasMeshGateway && len(canary.Spec.Service.Gateways) == 0 {
gateways = append(gateways, "mesh")
}

Expand Down

0 comments on commit db673dd

Please sign in to comment.