forked from isimluk/vulnapp
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvulnerable.openshift.yaml
79 lines (79 loc) · 1.45 KB
/
vulnerable.openshift.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
# oc apply -f vulnerable.openshift.yaml
# oc get route vulnapp
# oc delete -f vulnerable.openshift.yaml
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: vulnapp
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: vulnapp-anyuid
subjects:
- kind: ServiceAccount
name: vulnapp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: 'system:openshift:scc:anyuid'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vulnapp
labels:
app.kubernetes.io/part-of: vulnapp
spec:
selector:
matchLabels:
run: vulnapp
replicas: 1
template:
metadata:
labels:
run: vulnapp
spec:
serviceAccountName: vulnapp
securityContext:
runAsUser: 0
containers:
- name: vulnapp
image: quay.io/crowdstrike/vulnapp
imagePullPolicy: Always
command:
- "/entrypoint.sh"
ports:
- containerPort: 8080
name: web
---
apiVersion: v1
kind: Service
metadata:
name: vulnapp
labels:
app.kubernetes.io/part-of: vulnapp
spec:
selector:
run: vulnapp
ports:
- port: 80
targetPort: 8080
type: ClusterIP
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: vulnapp
labels:
app.kubernetes.io/part-of: vulnapp
spec:
to:
kind: Service
name: vulnapp
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
port:
targetPort: 8080