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 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 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 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 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 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