-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathatlant_basic.yaml
106 lines (103 loc) · 2.4 KB
/
atlant_basic.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
---
apiVersion: v1
kind: Namespace
metadata:
name: atlant-dev-ns
---
apiVersion: v1
kind: ConfigMap
metadata:
name: atlant-cfg-map
namespace: atlant-dev-ns
data:
config.json: |
{
"subscription_key": "ATLANT-LICENSE-KEY",
"scanning": {
"http_endpoints": [
{
"address": "0.0.0.0",
"port": 8081
}
]
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: atlant-deployment
namespace: atlant-dev-ns
labels:
app: atlant
spec:
replicas: 3
selector:
matchLabels:
app: atlant
template:
metadata:
labels:
app: atlant
spec:
containers:
- name: atlant-container
image: public.ecr.aws/withsecure/atlant:latest
resources:
# Resource consumption depends on configuration
# (for example how deeply archives should be scanned)
# and files to scan (size, archives depth, number of simultaneous requests per pod).
# This is an example for medium sized zip bomb.
requests:
memory: "2048Mi"
cpu: "500m"
limits:
memory: "8192Mi"
cpu: "2000m"
securityContext:
allowPrivilegeEscalation: false
ports:
- containerPort: 8081
readinessProbe:
# Wait for default virus definitions update
exec:
command:
- /bin/bash
- -c
- "[ -z $(/opt/withsecure/atlant/bin/update --list --no-lock | tr -d ' \n\r ') ]"
initialDelaySeconds: 20
periodSeconds: 5
failureThreshold: 30
livenessProbe:
httpGet:
path: /api/status/v1
port: 8081
initialDelaySeconds: 180
periodSeconds: 1800
timeoutSeconds: 10
failureThreshold: 1
volumeMounts:
- name: atlant-cfg-volume
mountPath: "/etc/opt/withsecure/atlant/config"
readOnly: true
volumes:
- name: atlant-cfg-volume
configMap:
name: atlant-cfg-map
items:
- key: "config.json"
path: "config.json"
---
apiVersion: v1
kind: Service
metadata:
name: atlant-service
namespace: atlant-dev-ns
spec:
selector:
app: atlant
ports:
- port: 80
targetPort: 8081
nodePort: 31273
type: LoadBalancer