-
Notifications
You must be signed in to change notification settings - Fork 115
/
alaz.yaml
112 lines (112 loc) · 2.62 KB
/
alaz.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
apiVersion: v1
kind: ServiceAccount
metadata:
name: alaz-serviceaccount
namespace: ddosify
---
# For alaz to keep track of changes in cluster
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: alaz-role
namespace: ddosify
rules:
- apiGroups:
- "*"
resources:
- pods
- services
- endpoints
- replicasets
- deployments
- daemonsets
verbs:
- "get"
- "list"
- "watch"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: alaz-role-binding
namespace: ddosify
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: alaz-role
subjects:
- kind: ServiceAccount
name: alaz-serviceaccount
namespace: ddosify
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: alaz-daemonset
namespace: ddosify
spec:
selector:
matchLabels:
app: alaz
template:
metadata:
labels:
app: alaz
spec:
hostPID: true
containers:
- env:
- name: EBPF_ENABLED
value: "true"
- name: METRICS_ENABLED
value: "true"
- name: BACKEND_HOST
value: http://localhost:8014/api
- name: LOG_LEVEL
value: "1"
- name: MONITORING_ID
value: 2f5231e4-c2db-4bf2-84ff-49b770fa3615
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
args:
- --no-collector.wifi
- --no-collector.hwmon
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.netclass.ignored-devices=^(veth.*)$
image: ddosify/alaz:v0.1.4
imagePullPolicy: IfNotPresent
name: alaz-pod
ports:
- containerPort: 8181
protocol: TCP
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 500m
memory: 400Mi
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
# needed for linking ebpf trace programs
volumeMounts:
- mountPath: /sys/kernel/debug
name: debugfs
readOnly: false
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: alaz-serviceaccount
serviceAccountName: alaz-serviceaccount
terminationGracePeriodSeconds: 30
# needed for linking ebpf trace programs
volumes:
- name: debugfs
hostPath:
path: /sys/kernel/debug