-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedge-proxy.yaml
75 lines (71 loc) · 1.64 KB
/
edge-proxy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apiVersion: apps/v1
kind: Deployment
metadata:
name: edge-proxy
namespace: jon
labels:
app: edge-proxy
spec:
replicas: 1 selector:
matchLabels:
app: edge-proxy
template:
metadata:
labels:
app: edge-proxy
annotations:
sidecar.istio.io/inject: "true"
traffic.sidecar.istio.io/includeOutboundIPRanges: 172.17.0.0/18,172.21.0.0/16,172.30.0.0/16
spec:
containers:
- image: bitnami/nginx:latest
name: nginx
volumeMounts:
- name: sni-proxy-config
mountPath: /etc/nginx
readOnly: true
tolerations:
- key: "dedicated"
operator: "Equal"
value: "edge"
effect: "NoExecute"
nodeSelector:
ibm-cloud.kubernetes.io/worker-pool-name: edge
volumes
---
apiVersion: v1
kind: Service
metadata:
name: edge-proxy
spec:
selector:
app: edge-proxy
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: v1
data:
nginx.conf: |
# setup custom path that do not require root access
pid /tmp/nginx.pid;
events {
}
stream {
log_format log_stream '$remote_addr [$time_local] $protocol [$ssl_preread_server_name]'
'$status $bytes_sent $bytes_received $session_time';
access_log /var/log/nginx/access.log log_stream;
error_log /var/log/nginx/error.log;
# tcp forward proxy by SNI
server {
resolver 8.8.8.8 ipv6=off;
listen 127.0.0.1:18443;
proxy_pass $ssl_preread_server_name:443;
ssl_preread on;
}
}
kind: ConfigMap
metadata:
name: edge-proxy-sni-config
namespace: istio-system