forked from DevFactory/smartnat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.yaml
51 lines (51 loc) · 1.22 KB
/
manifest.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: echo-test-service
namespace: default
labels:
app: echo-test-service
spec:
replicas: 1
selector:
matchLabels:
app: echo-test-service
template:
metadata:
labels:
app: echo-test-service
spec:
containers:
- name: echoserver
image: gcr.io/google_containers/echoserver:1.10
ports:
- containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
name: echo-test-service
namespace: default
spec:
type: ClusterIP
selector:
app: echo-test-service
ports:
- protocol: TCP
port: 8080
targetPort: 8080
---
apiVersion: smartnat.aureacentral.com/v1alpha1
kind: Mapping
metadata:
name: mapping-echo-service
spec:
addresses:
- "192.168.60.5"
allowedSources:
- "0.0.0.0/0"
serviceName: "echo-test-service" # the name of the Service to target; must be in the same namespace
mode: "service" # mandatory; "service" is currently the only supported mode
ports: # list; at least 1 address is required;
- port: 8080 # maps from external port 8080 to 8080 TCP on Service side (same "servicePort:" and 'protocol: "TCP"' are defaults)