Skip to content

Commit

Permalink
Remove VirtualService examples that no longer have an effect (#11892)
Browse files Browse the repository at this point in the history
* Remove no-longer-needed VirtualServices

ServiceEntry for github.com not needed to clone https URLs

* Modifications after testing using release-1.1-20190214-09-16

* Correct comment explanation

* Include pythonhosted.org for 'pypi' and sort/format/dedup the github addresses
  • Loading branch information
esnible authored and linsun committed Feb 28, 2019
1 parent 38caa77 commit 5ae1403
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 62 deletions.
39 changes: 9 additions & 30 deletions samples/external/github.yaml
Expand Up @@ -17,24 +17,6 @@ spec:
name: https
protocol: HTTPS
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: github-https
spec:
hosts:
- github.com
tls:
- match:
- port: 443
sniHosts:
- github.com
route:
- destination:
host: github.com
port:
number: 443
---
# For TCP services the IP ranges SHOULD be specified to avoid problems
# if multiple SEs use the same port number.
# See https://istio.io/blog/2018/egress-tcp/#mesh-external-service-entry-for-an-external-mysql-instance
Expand All @@ -46,27 +28,24 @@ spec:
hosts:
- dummy.github.com # not used
addresses: # from https://help.github.com/articles/about-github-s-ip-addresses/
- "192.30.252.0/22"
- "185.199.108.0/22"
- "140.82.112.0/20"
- "192.30.252.0/22"
- "185.199.108.0/22"
- "140.82.112.0/20"
- "13.229.188.59/32"
- "13.250.177.223/32"
- "140.82.112.0/20"
- "18.194.104.89/32"
- "18.195.85.27/32"
- "35.159.8.160/32"
- "52.74.223.119/32"
- "192.30.252.153/32"
- "192.30.252.154/32"
- "185.199.108.0/22"
- "185.199.108.153/32"
- "185.199.109.153/32"
- "185.199.110.153/32"
- "185.199.111.153/32"
- "54.87.5.173/32"
- "54.166.52.62/32"
- "192.30.252.0/22"
- "192.30.252.153/32"
- "192.30.252.154/32"
- "23.20.92.3/32"
- "35.159.8.160/32"
- "52.74.223.119/32"
- "54.166.52.62/32"
- "54.87.5.173/32"
ports:
- name: tcp
number: 22
Expand Down
40 changes: 8 additions & 32 deletions samples/external/pypi.yaml
Expand Up @@ -17,26 +17,7 @@ spec:
name: https
protocol: HTTPS
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: python-https
spec:
hosts:
- pypi.python.org
tls:
- match:
- port: 443
sniHosts:
- pypi.python.org
route:
- destination:
host: pypi.python.org
port:
number: 443
---
# pypi.python.org may 301 redirect to pypi.org, so we need this too.

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
Expand All @@ -49,20 +30,15 @@ spec:
name: https
protocol: HTTPS
---
# pip install may fetch files from files.pythonhosted.org
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
kind: ServiceEntry
metadata:
name: pypi-https
name: pythonhosted-https
spec:
hosts:
- pypi.org
tls:
- match:
- port: 443
sniHosts:
- pypi.org
route:
- destination:
host: pypi.org
port:
number: 443
- files.pythonhosted.org
ports:
- number: 443
name: https
protocol: HTTPS

0 comments on commit 5ae1403

Please sign in to comment.