-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshop-web-privileged.yaml
74 lines (73 loc) · 1.63 KB
/
shop-web-privileged.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: shop-web
labels:
app: shop-web
spec:
replicas: 1
selector:
matchLabels:
app: shop-web
template:
metadata:
labels:
app: shop-web
annotations:
container.apparmor.security.beta.kubernetes.io/shop-web: runtime/default
spec:
containers:
- name: shop-web
image: <YOUR-REGISTRY-REPO>/vuln-shop-demo-web:latest
ports:
- containerPort: 8080
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /ping
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
volumeMounts:
- mountPath: /app/uploads
name: uploads
- mountPath: /app/views/images/rendered
name: rendered
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsNonRoot: false
runAsUser: 0
resources: {}
volumes:
- name: uploads
emptyDir: {}
- name: rendered
emptyDir: {}
automountServiceAccountToken: false
securityContext:
seccompProfile:
type: RuntimeDefault
strategy:
type: Recreate
---
apiVersion: v1
kind: Service
metadata:
labels:
app: shop-web
name: shop-web
namespace: default
spec:
type: NodePort
ports:
- port: 8080
protocol: TCP
targetPort: 8080
nodePort: 31080
selector:
app: shop-web