-
Notifications
You must be signed in to change notification settings - Fork 23
/
laitos-in-k8s.yaml
83 lines (81 loc) · 2.18 KB
/
laitos-in-k8s.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
76
77
78
79
80
81
82
83
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: laitos-app-deployment
spec:
replicas: 2
selector:
matchLabels:
pod-app: laitos-pod
template:
metadata:
labels:
pod-app: laitos-pod
spec:
containers:
- name: laitos-container
imagePullPolicy: Always
image: hzgl/laitos:latest
args: ["-daemons", "insecurehttpd"]
env:
- name: LAITOS_CONFIG
value: |
{
"HTTPFilters": {
"LintText": {
"MaxLength": 1000
},
"PINAndShortcuts": {
"Passwords": [
"password"
]
}
},
"HTTPHandlers": {
"CommandFormEndpoint": "/cmd",
"FileUploadEndpoint": "/upload",
"InformationEndpoint": "/info",
"LatestRequestsInspectorEndpoint": "/latest_requests",
"ProcessExplorerEndpoint": "/proc",
"RequestInspectorEndpoint": "/myrequest",
"WebProxyEndpoint": "/proxy"
}
}
- name: LAITOS_INDEX_PAGE
value: |
Hello from k8s!
This is a demo app, brought to you by the laitos open source project: https://github.com/HouzuoGuo/laitos
Try these out: /cmd /upload /info /latest_requests?e=1 /proc?pid=0 /myrequest /proxy?u=http://google.com
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: laitos-svc
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
pod-app: laitos-pod
type: ClusterIP
sessionAffinity: None
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: laitos-ingress
spec:
rules:
- http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: laitos-svc
port:
number: 80