From c397ef86db3bd150e1843df12b483793d63d426f Mon Sep 17 00:00:00 2001 From: Henry Geay de Montenon Date: Thu, 1 Sep 2022 13:56:28 +0200 Subject: [PATCH] adding an ocp4_aio_odflite option with lowered odf req --- defaults/main.yaml | 3 +- files/storage-cluster-lite.yaml | 59 +++++++++++++++++++++++++++++++++ tasks/main.yml | 15 ++++++++- 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 files/storage-cluster-lite.yaml diff --git a/defaults/main.yaml b/defaults/main.yaml index 8ef8c22..674a624 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -1 +1,2 @@ -ocp4_aio_nanodf: False \ No newline at end of file +ocp4_aio_nanodf: False +ocp4_aio_odflite: False \ No newline at end of file diff --git a/files/storage-cluster-lite.yaml b/files/storage-cluster-lite.yaml new file mode 100644 index 0000000..25227c4 --- /dev/null +++ b/files/storage-cluster-lite.yaml @@ -0,0 +1,59 @@ +apiVersion: ocs.openshift.io/v1 +kind: StorageCluster +metadata: + name: ocs-storagecluster + namespace: openshift-storage +spec: + resources: + mon: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 125m + memory: 1Gi + mds: + limits: + cpu: 3 + memory: 256Mi + requests: + cpu: 125m + memory: 128Mi + mgr: + limits: + cpu: 500m + memory: 1Gi + requests: + cpu: 125m + memory: 512Mi + rgw: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 125m + memory: 256Mi + manageNodes: false + monDataDirHostPath: /var/lib/rook + storageDeviceSets: + - count: 2 + dataPVCTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Gi + storageClassName: localblock + volumeMode: Block + name: ocs-deviceset + resources: + limits: + cpu: 2 + memory: 3Gi + requests: + cpu: 2 + memory: 1500Mi + placement: {} + portable: false + replica: 3 diff --git a/tasks/main.yml b/tasks/main.yml index 885a48c..d36572c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -81,7 +81,20 @@ retries: 20 delay: 30 until: storage_cluster_success is not failed - when: not ocp4_aio_nanodf + when: not ocp4_aio_nanodf and not ocp4_aio_odflite + +- name: Apply lightweight storage-cluster configuration + k8s: + state: present + definition: "{{ lookup('file', 'storage-cluster-lite.yaml') }}" + register: storage_cluster_success + retries: 20 + delay: 30 + until: storage_cluster_success is not failed + when: + - not ocp4_aio_nanodf + - ocp4_aio_odflite + - name: Apply Extra config for rook for ODF Nano k8s: