forked from coveooss/wazuh-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wazuh-manager-worker-1-sts.yaml
83 lines (82 loc) · 2.34 KB
/
wazuh-manager-worker-1-sts.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
#######################################################################
# Kubernetes StatefulSet for Wazuh manager worker-1 node
#
# We have 3 StatefulSet because the Manager configuration requires the
# node_name to be unique for each cluster member.
#
# https://github.com/wazuh/wazuh/issues/1329 will allow us to go back
# to a single StatefulSet for all workers.
#######################################################################
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: wazuh-manager-worker-1
namespace: wazuh
spec:
replicas: 1
selector:
matchLabels:
app: wazuh-manager
node-type: worker
sts-id: '1'
serviceName: wazuh-cluster
podManagementPolicy: Parallel
template:
metadata:
labels:
app: wazuh-manager
node-type: worker
sts-id: '1'
name: wazuh-manager-worker-1
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: sts-id
operator: In
values:
- '0'
topologyKey: kubernetes.io/hostname
volumes:
- name: config
configMap:
name: wazuh-manager-worker-1-conf
containers:
- name: wazuh-manager
image: 'wazuh/wazuh:3.6.1_6.4.0'
resources:
requests:
cpu: 500m
memory: 256Mi
limits:
cpu: 1
memory: 512Mi
volumeMounts:
- name: config
mountPath: /wazuh-config-mount/etc/ossec.conf
subPath: ossec.conf
readOnly: true
- name: wazuh-manager-worker
mountPath: /var/ossec/data
- name: wazuh-manager-worker
mountPath: /etc/postfix
ports:
- containerPort: 1514
name: agents-events
- containerPort: 1516
name: wazuh-clusterd
volumeClaimTemplates:
- metadata:
name: wazuh-manager-worker
namespace: wazuh
spec:
accessModes:
- ReadWriteOnce
storageClassName: gp2-encrypted-retained
resources:
requests:
storage: 10Gi