From 088fe4e735451149915f92c908eac69460f03198 Mon Sep 17 00:00:00 2001 From: Chris Butler Date: Thu, 16 May 2024 10:12:07 +1000 Subject: [PATCH] feat: template out MCG Signed-off-by: Chris Butler --- charts/all/mcg/templates/backing-store.yaml | 12 +++++++----- charts/all/mcg/templates/bucket-class.yaml | 2 +- charts/all/mcg/templates/storage-system.yaml | 4 +++- charts/all/mcg/values.yaml | 10 ++++++++++ values-global.yaml | 18 ++++++++++-------- values-hub.yaml | 3 ++- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/charts/all/mcg/templates/backing-store.yaml b/charts/all/mcg/templates/backing-store.yaml index cd7be1f..7be4792 100644 --- a/charts/all/mcg/templates/backing-store.yaml +++ b/charts/all/mcg/templates/backing-store.yaml @@ -1,18 +1,20 @@ + apiVersion: noobaa.io/v1alpha1 kind: BackingStore metadata: - name: local-backingstore + name: mcg-backingstore namespace: openshift-storage finalizers: - noobaa.io/finalizer labels: app: noobaa spec: +{{ if .Values.global.objectStorage.pvcStorage }} pvPool: - numVolumes: 3 + numVolumes: {{ .Values.global.objectStorage.volumes }} resources: requests: - storage: 50Gi - secret: {} - storageClass: gp3 + storage: {{ .Values.global.objectStorage.storagePool }} + storageClass: {{ .Values.global.objectStorage.backingStorageClass }} type: pv-pool +{{ end }} \ No newline at end of file diff --git a/charts/all/mcg/templates/bucket-class.yaml b/charts/all/mcg/templates/bucket-class.yaml index 07c8698..3c05fa3 100644 --- a/charts/all/mcg/templates/bucket-class.yaml +++ b/charts/all/mcg/templates/bucket-class.yaml @@ -9,5 +9,5 @@ spec: placementPolicy: tiers: - backingStores: - - local-backingstore + - mcg-backingstore placement: Spread \ No newline at end of file diff --git a/charts/all/mcg/templates/storage-system.yaml b/charts/all/mcg/templates/storage-system.yaml index 5647467..5faf9fc 100644 --- a/charts/all/mcg/templates/storage-system.yaml +++ b/charts/all/mcg/templates/storage-system.yaml @@ -1,3 +1,4 @@ +{{ if not .Values.global.objectStorage.existingODF }} apiVersion: odf.openshift.io/v1alpha1 kind: StorageSystem metadata: @@ -6,4 +7,5 @@ metadata: spec: kind: storagecluster.ocs.openshift.io/v1 name: ocs-storagecluster - namespace: openshift-storage \ No newline at end of file + namespace: openshift-storage +{{ end }} \ No newline at end of file diff --git a/charts/all/mcg/values.yaml b/charts/all/mcg/values.yaml index e69de29..436685e 100644 --- a/charts/all/mcg/values.yaml +++ b/charts/all/mcg/values.yaml @@ -0,0 +1,10 @@ +global: + objectStorage: + # Whether or not to use PVC storage + pvcStorage: true + volumes: 3 + storagePool: 50Gi + backingStorageClass: "ocs-external-storagecluster-ceph-rbd" + # IF ODF exists we don't need to deploy an storage system + existingODF: true + odfStorageSystem: "ocs-external-storagecluster-storagesystem" diff --git a/values-global.yaml b/values-global.yaml index 3b679a4..1ebd350 100644 --- a/values-global.yaml +++ b/values-global.yaml @@ -5,16 +5,18 @@ global: syncPolicy: Automatic installPlanApproval: Automatic + objectStorage: + # Whether or not to use PVC storage + pvcStorage: true + replicas: 3 + storagePool: 50Gi + backingStorageClass: "ocs-external-storagecluster-ceph-rbd" + # IF ODF exists we don't need to deploy an storage system + existingODF: true + odfStorageSystem: "ocs-external-storagecluster-storagesystem" + main: clusterGroupName: hub multiSourceConfig: enabled: true -objectStorage: - replicas: 3 - storagePool: 50Gi - - odfStorageClass: "" - backingStorageClass: "" - - diff --git a/values-hub.yaml b/values-hub.yaml index 6745f9c..0bc6f82 100644 --- a/values-hub.yaml +++ b/values-hub.yaml @@ -18,7 +18,8 @@ clusterGroup: subscriptions: rhoai: name: rhods-operator - channel: stable + # Fast is required for 2.9.0 + channel: fast namespace: openshift-operators openshift-pipelines: