From 21b16e68b2cf2a3b9b0d751ca45c87ad0394a3a7 Mon Sep 17 00:00:00 2001 From: mahakfaheem Date: Thu, 27 Apr 2023 02:02:09 +0530 Subject: [PATCH 1/6] Adding build for deployment on the AKS --- envs/aks/aks_README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 envs/aks/aks_README.md diff --git a/envs/aks/aks_README.md b/envs/aks/aks_README.md new file mode 100644 index 00000000..c246527e --- /dev/null +++ b/envs/aks/aks_README.md @@ -0,0 +1 @@ +Wazuh deployment Code Azure Kubernetes Service From 48c4a22e3ef1f7e6311ba0b5c3d5690aad06a69d Mon Sep 17 00:00:00 2001 From: mahakfaheem Date: Thu, 27 Apr 2023 02:19:59 +0530 Subject: [PATCH 2/6] Adding build for deployment on the AKS --- envs/aks/storage-class.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 envs/aks/storage-class.yaml diff --git a/envs/aks/storage-class.yaml b/envs/aks/storage-class.yaml new file mode 100644 index 00000000..00be2fe8 --- /dev/null +++ b/envs/aks/storage-class.yaml @@ -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 \ No newline at end of file From 60f328fedec64f25065f7c7aa5bd9ec7d38528fd Mon Sep 17 00:00:00 2001 From: mahakfaheem Date: Thu, 27 Apr 2023 02:21:12 +0530 Subject: [PATCH 3/6] Adding build for deployment on the AKS --- envs/aks/dashboard-resources.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 envs/aks/dashboard-resources.yaml diff --git a/envs/aks/dashboard-resources.yaml b/envs/aks/dashboard-resources.yaml new file mode 100644 index 00000000..a20c0b4b --- /dev/null +++ b/envs/aks/dashboard-resources.yaml @@ -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 \ No newline at end of file From 9a396b2187c3bb1b285ae99775cea1f77319aae8 Mon Sep 17 00:00:00 2001 From: mahakfaheem Date: Thu, 27 Apr 2023 02:23:14 +0530 Subject: [PATCH 4/6] Adding build for deployment on the AKS --- envs/aks/indexer-resources.yaml | 28 ++++++++++++++++++++++++++++ envs/aks/kustomization.yaml | 9 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 envs/aks/indexer-resources.yaml create mode 100644 envs/aks/kustomization.yaml diff --git a/envs/aks/indexer-resources.yaml b/envs/aks/indexer-resources.yaml new file mode 100644 index 00000000..c51fe29e --- /dev/null +++ b/envs/aks/indexer-resources.yaml @@ -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 \ No newline at end of file diff --git a/envs/aks/kustomization.yaml b/envs/aks/kustomization.yaml new file mode 100644 index 00000000..3f7505ce --- /dev/null +++ b/envs/aks/kustomization.yaml @@ -0,0 +1,9 @@ + +bases: + - ../../wazuh +patches: + - storage-class.yaml + - indexer-resources.yaml + - dashboard-resources.yaml + - wazuh-master-resources.yaml + - wazuh-worker-resources.yaml \ No newline at end of file From 65300047148d920075e594e2e976fcab641643c2 Mon Sep 17 00:00:00 2001 From: mahakfaheem Date: Thu, 27 Apr 2023 02:25:16 +0530 Subject: [PATCH 5/6] Adding build for deployment on the AKS --- envs/aks/wazuh-master-resources.yaml | 28 ++++++++++++++++++++++++++++ envs/aks/wazuh-worker-resources.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 envs/aks/wazuh-master-resources.yaml create mode 100644 envs/aks/wazuh-worker-resources.yaml diff --git a/envs/aks/wazuh-master-resources.yaml b/envs/aks/wazuh-master-resources.yaml new file mode 100644 index 00000000..8edefe13 --- /dev/null +++ b/envs/aks/wazuh-master-resources.yaml @@ -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 \ No newline at end of file diff --git a/envs/aks/wazuh-worker-resources.yaml b/envs/aks/wazuh-worker-resources.yaml new file mode 100644 index 00000000..f5ff6b12 --- /dev/null +++ b/envs/aks/wazuh-worker-resources.yaml @@ -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 \ No newline at end of file From f805a4495185f9f77b69186f112098f3dbad605e Mon Sep 17 00:00:00 2001 From: mahakfaheem Date: Thu, 27 Apr 2023 02:32:40 +0530 Subject: [PATCH 6/6] Adding build for deployment on the AKS --- wazuh/base/storage-class.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wazuh/base/storage-class.yaml b/wazuh/base/storage-class.yaml index 9f675b0b..3d9fab7d 100644 --- a/wazuh/base/storage-class.yaml +++ b/wazuh/base/storage-class.yaml @@ -11,4 +11,5 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: wazuh-storage -# provisioner: k8s.io/minikube-hostpath \ No newline at end of file +# UPDATE THE STORAGE CLASS PROVISIONER HERE +# provisioner: file.csi.azure.com <- for example \ No newline at end of file