diff --git a/Chart.yaml b/Chart.yaml index 7b2574f..991fff7 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.0 +version: 0.3.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/README.md b/README.md index 9161a04..552eed6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # openshift-data-foundations -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) +![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) A Helm chart to install ODF on Openshift ### Notable changes +* v0.3.1: Make `objectStorage.enable`: `false` cover more resources. + * v0.3.0: Replace `global.datacenter.storageClassName` with `odf.osd.pvc.storageClassName`. When unset, the OSD storage class is derived from `global.clusterPlatform` (AWS: `gp3-csi`, Azure: `managed-csi`, GCP: `standard-csi`). @@ -44,7 +46,7 @@ default failure domain for objectStorage. | job.successfulJobsHistoryLimit | int | `3` | successfulJobsHistoryLimit for the label-storage-nodes CronJob. | | objectStorage.dataPool.failureDomain | string | `"host"` | Failuredomain for the dataPool | | objectStorage.dataPool.replicas | int | `3` | | -| objectStorage.enable | bool | `true` | | +| objectStorage.enable | bool | `true` | Deploy object storage (Ceph RGW, NooBaa MCG, and related StorageClasses/Routes). When false, NooBaa reconciliation is disabled. | | objectStorage.gateway.instances | int | `2` | | | objectStorage.metadataPool.failureDomain | string | `"host"` | Failuredomain for the metadataPool | | objectStorage.resources.limits.cpu | string | `"2"` | | diff --git a/README.md.gotmpl b/README.md.gotmpl index 59eb063..875dfc3 100644 --- a/README.md.gotmpl +++ b/README.md.gotmpl @@ -7,6 +7,8 @@ ### Notable changes +* v0.3.1: Make `objectStorage.enable`: `false` cover more resources. + * v0.3.0: Replace `global.datacenter.storageClassName` with `odf.osd.pvc.storageClassName`. When unset, the OSD storage class is derived from `global.clusterPlatform` (AWS: `gp3-csi`, Azure: `managed-csi`, GCP: `standard-csi`). @@ -14,7 +16,6 @@ Also add a CronJob that periodically re-runs the same node-labeling logic as the bootstrap Job (same useSpecificNodes / selector conditions). - * v0.2.3: Allow passing of label selector to labelling job to avoid, for example, labelling submariner nodes. Also ensure at least 3 nodes are labelled when using label selector. diff --git a/templates/odf-storagecluster.yaml b/templates/odf-storagecluster.yaml index 358e34e..5f2fb85 100644 --- a/templates/odf-storagecluster.yaml +++ b/templates/odf-storagecluster.yaml @@ -7,6 +7,10 @@ spec: {{- if .Values.odf.enable_mirroring }} mirroring: enabled: true +{{- end }} +{{- if not .Values.objectStorage.enable }} + multiCloudGateway: + reconcileStrategy: ignore {{- end }} resources: mon: @@ -21,6 +25,7 @@ spec: requests: cpu: {{ .Values.odf.mgr.requests.cpu | squote }} memory: {{ .Values.odf.mgr.requests.memory }} +{{- if .Values.objectStorage.enable }} noobaa-core: requests: cpu: {{ .Values.odf.noobaacore.requests.cpu | squote }} @@ -29,6 +34,7 @@ spec: requests: cpu: {{ .Values.odf.noobaadb.requests.cpu | squote }} memory: {{ .Values.odf.noobaadb.requests.memory }} +{{- end }} storageDeviceSets: - name: ocs-deviceset config: {} diff --git a/templates/rgw-route.yaml b/templates/rgw-route.yaml index ce8fc7c..ca0c13a 100644 --- a/templates/rgw-route.yaml +++ b/templates/rgw-route.yaml @@ -1,3 +1,4 @@ +{{- if .Values.objectStorage.enable -}} apiVersion: route.openshift.io/v1 kind: Route metadata: @@ -21,4 +22,5 @@ spec: tls: termination: edge insecureEdgeTerminationPolicy: Allow - wildcardPolicy: None \ No newline at end of file + wildcardPolicy: None +{{- end -}} \ No newline at end of file diff --git a/templates/rgw-storageclass.yaml b/templates/rgw-storageclass.yaml index b4c2ca2..d58c0ff 100644 --- a/templates/rgw-storageclass.yaml +++ b/templates/rgw-storageclass.yaml @@ -1,3 +1,4 @@ +{{- if .Values.objectStorage.enable -}} kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -10,3 +11,4 @@ parameters: objectStoreNamespace: {{ .Values.odf.namespace }} reclaimPolicy: Delete volumeBindingMode: Immediate +{{- end -}} diff --git a/templates/storageclass.yaml b/templates/storageclass.yaml index eae8467..8314a1a 100644 --- a/templates/storageclass.yaml +++ b/templates/storageclass.yaml @@ -41,6 +41,7 @@ parameters: provisioner: openshift-storage.cephfs.csi.ceph.com reclaimPolicy: Delete volumeBindingMode: Immediate +{{- if .Values.objectStorage.enable }} --- apiVersion: storage.k8s.io/v1 kind: StorageClass @@ -53,3 +54,4 @@ parameters: provisioner: openshift-storage.noobaa.io/obc reclaimPolicy: Delete volumeBindingMode: Immediate +{{- end }} diff --git a/tests/odf_storagecluster_storageclass_test.yaml b/tests/odf_storagecluster_storageclass_test.yaml index 5fb79d9..367ebc8 100644 --- a/tests/odf_storagecluster_storageclass_test.yaml +++ b/tests/odf_storagecluster_storageclass_test.yaml @@ -57,3 +57,30 @@ tests: asserts: - failedTemplate: errorMessage: 'Set odf.osd.pvc.storageClassName or use a supported global.clusterPlatform (AWS, Azure, GCP); got "BareMetal"' + + - it: Should disable NooBaa when object storage is disabled + set: + objectStorage: + enable: false + asserts: + - equal: + path: spec.multiCloudGateway.reconcileStrategy + value: ignore + - isNull: + path: spec.resources.noobaa-core + - isNull: + path: spec.resources.noobaa-db + + - it: Should configure NooBaa resources when object storage is enabled + set: + objectStorage: + enable: true + asserts: + - isNull: + path: spec.multiCloudGateway + - equal: + path: spec.resources.noobaa-core.requests.cpu + value: "1" + - equal: + path: spec.resources.noobaa-db.requests.memory + value: 4Gi diff --git a/tests/storageclass_default_test.yaml b/tests/storageclass_default_test.yaml index 37622ec..95e0763 100644 --- a/tests/storageclass_default_test.yaml +++ b/tests/storageclass_default_test.yaml @@ -17,3 +17,13 @@ tests: documentSelector: path: metadata.name value: ocs-storagecluster-ceph-rbd + + - it: Should omit NooBaa StorageClass when object storage is disabled + set: + objectStorage: + enable: false + asserts: + - hasDocuments: + count: 2 + - notMatchRegexRaw: + pattern: openshift-storage\.noobaa\.io diff --git a/values.yaml b/values.yaml index 7970ffe..5c7c3ca 100644 --- a/values.yaml +++ b/values.yaml @@ -50,6 +50,7 @@ route: #Define the CephObjectStorage parameters objectStorage: + # -- Deploy object storage (Ceph RGW, NooBaa MCG, and related StorageClasses/Routes). When false, NooBaa reconciliation is disabled. enable: true dataPool: replicas: 3