-
Notifications
You must be signed in to change notification settings - Fork 9
/
sockshop-waf-frontend.yaml
136 lines (136 loc) · 3.6 KB
/
sockshop-waf-frontend.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
apiVersion: apps/v1
kind: Deployment
metadata:
name: front-end
labels:
app.kubernetes.io/instance: WAAS
app.kubernetes.io/name: WAAS
namespace: sock-shop
spec:
selector:
matchLabels:
name: front-end
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/instance: WAAS
app.kubernetes.io/name: WAAS
name: front-end
spec:
containers:
- name: enforcer
ports:
- name: stats
containerPort: 19010
command:
- /wrapper.sh
- -n=kwaf
- -m=waas-controller-service
- -p=sock-shop/sock-shop-frontend
- -t=frontendEnforcer
- -e
- -c=19011:sockshopPolicy:127.0.0.1:8079
- -l=$HOSTNAME_access.log
- -f=$HOSTNAME_security.log
imagePullPolicy: IfNotPresent
image: <replace-with-registry-name>/radware/waas-bootstrap:1.4.0
env:
- name: ENFORCER_OPT_L
value: info
- name: ENFORCER_OPT_BASE_ID
value: "321"
volumeMounts:
- mountPath: /logs
name: logs-volume
readinessProbe:
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
httpGet:
path: /
port: 19011
scheme: HTTP
livenessProbe:
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
httpGet:
path: /
port: 19011
scheme: HTTP
- name: logrotate
image: <replace-with-registry-name>/radware/waas-logrotate:1.4.0
imagePullPolicy: IfNotPresent
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- name: logs-volume
mountPath: /logs
- name: fluentbit
image: <replace-with-registry-name>/radware/waas-fluentbit:1.4.0
imagePullPolicy: IfNotPresent
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
env:
- name: FB_LS_HOST
value : waas-logstash-service.kwaf.svc.cluster.local
- name: FB_PREFIX
value: front-end.sock-shop-prod
resources: {}
volumeMounts:
- name: securebeat-client-volume
mountPath: /etc/securebeat/client
- name: securebeat-ca-volume
mountPath: /etc/securebeat/ca
- name: logs-volume
mountPath: /logs
- name: front-end
image: weaveworksdemos/front-end:0.3.12
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 8079
securityContext:
runAsNonRoot: true
runAsUser: 10001
capabilities:
drop:
- all
readOnlyRootFilesystem: true
nodeSelector:
beta.kubernetes.io/os: linux
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
shareProcessNamespace: true
terminationGracePeriodSeconds: 30
volumes:
- name: securebeat-ca-volume
configMap:
name: waas-securebeat-ca-config
- name: securebeat-client-volume
secret:
secretName: waas-securebeat-client-secret
- name: logs-volume
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: front-end
labels:
app.kubernetes.io/instance: WAAS
app.kubernetes.io/name: WAAS
waas-prometheus-service: monitor
name: front-end
namespace: sock-shop
spec:
ports:
- port: 80
targetPort: 19011
selector:
name: front-end