Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AKS deployment #351

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions envs/aks/aks_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Wazuh deployment Code Azure Kubernetes Service
17 changes: 17 additions & 0 deletions envs/aks/dashboard-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wazuh-dashboard
namespace: wazuh
spec:
template:
spec:
containers:
- name: wazuh-dashboard
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 400m
memory: 2Gi
28 changes: 28 additions & 0 deletions envs/aks/indexer-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: wazuh-indexer
namespace: wazuh
spec:
template:
spec:
containers:
- name: wazuh-indexer
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 1
memory: 2Gi
volumeClaimTemplates:
- metadata:
name: wazuh-indexer
namespace: indexer-cluster
spec:
accessModes:
- ReadWriteOnce
storageClassName: wazuh-storage
resources:
requests:
storage: 10Gi
9 changes: 9 additions & 0 deletions envs/aks/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

bases:
- ../../wazuh
patches:
- storage-class.yaml
- indexer-resources.yaml
- dashboard-resources.yaml
- wazuh-master-resources.yaml
- wazuh-worker-resources.yaml
22 changes: 22 additions & 0 deletions envs/aks/storage-class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2019, Wazuh Inc.
#
# This program is a free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License (version 2) as published by the FSF - Free Software
# Foundation.

# Wazuh StorageClass

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: wazuh-storage

# In AKS, provisioners for stoarge class are "kubernetes.io/azure-disk" "kubernetes.io/azure-file"
provisioner: # UPDATE_YOUR_STORAGE_CLASS_PROVISIONER_HERE

parameters:
encrypted: 'true'
type: gp2
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Retain # Useful in case you delete the PersistentVolumeClaim
28 changes: 28 additions & 0 deletions envs/aks/wazuh-master-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: wazuh-manager-master
namespace: wazuh
spec:
template:
spec:
containers:
- name: wazuh-manager
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 2
memory: 2Gi
volumeClaimTemplates:
- metadata:
name: wazuh-manager-master
namespace: wazuh
spec:
accessModes:
- ReadWriteOnce
storageClassName: wazuh-storage
resources:
requests:
storage: 50Gi
28 changes: 28 additions & 0 deletions envs/aks/wazuh-worker-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: wazuh-manager-worker
namespace: wazuh
spec:
template:
spec:
containers:
- name: wazuh-manager
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 2
memory: 2Gi
volumeClaimTemplates:
- metadata:
name: wazuh-manager-worker
namespace: wazuh
spec:
accessModes:
- ReadWriteOnce
storageClassName: wazuh-storage
resources:
requests:
storage: 50Gi
3 changes: 2 additions & 1 deletion wazuh/base/storage-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: wazuh-storage
# provisioner: k8s.io/minikube-hostpath
# UPDATE THE STORAGE CLASS PROVISIONER HERE
# provisioner: file.csi.azure.com <- for example