Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
abasitt committed Jan 22, 2025
1 parent 295fc78 commit 5e55d32
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/istio-egress/curl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: curl
namespace: demo
spec:
replicas: 1
selector:
matchLabels:
app: curl
template:
metadata:
labels:
app: curl
spec:
containers:
- name: curl
image: quay.io/curl/curl:8.11.1
imagePullPolicy: Always
command: ["/bin/sleep", "infinity"]
env:
- name: TZ
value: Asia/Singapore
resources: {}
securityContext:
capabilities:
drop:
- ALL
84 changes: 84 additions & 0 deletions scripts/istio-egress/se-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
name: squid-proxy
namespace: demo
spec:
hosts:
- squid-proxy.local
addresses:
- 192.168.10.191/32
ports:
- number: 3128
name: https
protocol: HTTPS
location: MESH_EXTERNAL
resolution: STATIC
endpoints:
- address: 192.168.10.191
---
apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
name: edition-cnn-com
namespace: demo
spec:
hosts:
- edition.cnn.com
ports:
- number: 80
name: http-port
protocol: HTTP
targetPort: 443
- number: 443
name: https-port
protocol: HTTPS
resolution: DNS
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: edition-cnn-com
namespace: demo
spec:
host: edition.cnn.com
trafficPolicy:
portLevelSettings:
- port:
number: 80
tls:
mode: SIMPLE
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: squid-proxy
namespace: demo
spec:
host: squid-proxy.local
trafficPolicy:
tunnel:
protocol: CONNECT
targetHost: edition.cnn.com
targetPort: 443
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: cnn-via-squid
namespace: demo
spec:
hosts:
- edition.cnn.com
gateways:
- mesh
tls:
- match:
- port: 443
sniHosts:
- edition.cnn.com
route:
- destination:
host: squid-proxy.local
port:
number: 3128

0 comments on commit 5e55d32

Please sign in to comment.