From c0f99bc0a80b66a5ff61ae3ac40bff71f3014448 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Wed, 22 Jun 2022 17:27:30 -0400 Subject: [PATCH] [WIP] Configure ODF for NESE storage Attempt to configure an ODF external storage cluster. It looks as if the APIs have changed since we did this with 4.8, so we need to figure out what impact this has on the required manifests. x-branch: feature/odf --- .../ocsinitializations/ocsinit/kustomization.yaml | 4 ++++ .../ocsinit/ocsinitialization.yaml | 7 +++++++ .../ocs-external-storagecluster/kustomization.yaml | 5 +++++ .../ocs-external-storagecluster/storagecluster.yaml | 7 +++++++ .../kustomization.yaml | 5 +++++ .../storagesystem.yaml | 8 ++++++++ .../kustomization.yaml | 4 ++++ .../storageclass.yaml | 12 ++++++++++++ .../bundles/odf-external/kustomization.yaml | 7 +++++++ cluster-scope/bundles/odf/kustomization.yaml | 1 + .../overlays/nerc-ocp-infra/kustomization.yaml | 2 +- 11 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/kustomization.yaml create mode 100644 cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/ocsinitialization.yaml create mode 100644 cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/kustomization.yaml create mode 100644 cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/storagecluster.yaml create mode 100644 cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/kustomization.yaml create mode 100644 cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/storagesystem.yaml create mode 100644 cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/kustomization.yaml create mode 100644 cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/storageclass.yaml create mode 100644 cluster-scope/bundles/odf-external/kustomization.yaml diff --git a/cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/kustomization.yaml b/cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/kustomization.yaml new file mode 100644 index 00000000..f4e679f5 --- /dev/null +++ b/cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ocsinitialization.yaml diff --git a/cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/ocsinitialization.yaml b/cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/ocsinitialization.yaml new file mode 100644 index 00000000..50507db1 --- /dev/null +++ b/cluster-scope/base/ocs.openshift.io/ocsinitializations/ocsinit/ocsinitialization.yaml @@ -0,0 +1,7 @@ +apiVersion: ocs.openshift.io/v1 +kind: OCSInitialization +metadata: + name: ocsinit + namespace: openshift-storage +spec: + enableCephTools: true diff --git a/cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/kustomization.yaml b/cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/kustomization.yaml new file mode 100644 index 00000000..94088800 --- /dev/null +++ b/cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: openshift-storage +resources: + - storagecluster.yaml diff --git a/cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/storagecluster.yaml b/cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/storagecluster.yaml new file mode 100644 index 00000000..cf668adc --- /dev/null +++ b/cluster-scope/base/odf.openshift.io/storageclusters/ocs-external-storagecluster/storagecluster.yaml @@ -0,0 +1,7 @@ +apiVersion: ocs.openshift.io/v1 +kind: StorageCluster +metadata: + name: ocs-external-storagecluster +spec: + externalStorage: + enable: true diff --git a/cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/kustomization.yaml b/cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/kustomization.yaml new file mode 100644 index 00000000..b32ae01e --- /dev/null +++ b/cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: openshift-storage +resources: + - storagesystem.yaml diff --git a/cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/storagesystem.yaml b/cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/storagesystem.yaml new file mode 100644 index 00000000..995c13ff --- /dev/null +++ b/cluster-scope/base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem/storagesystem.yaml @@ -0,0 +1,8 @@ +apiVersion: odf.openshift.io/v1alpha1 +kind: StorageSystem +metadata: + name: ocs-external-storagecluster-storagesystem +spec: + kind: storagecluster.ocs.openshift.io/v1 + name: ocs-external-storagecluster + namespace: openshift-storage diff --git a/cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/kustomization.yaml b/cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/kustomization.yaml new file mode 100644 index 00000000..0184405f --- /dev/null +++ b/cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - storageclass.yaml diff --git a/cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/storageclass.yaml b/cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/storageclass.yaml new file mode 100644 index 00000000..ea92cfc0 --- /dev/null +++ b/cluster-scope/base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd/storageclass.yaml @@ -0,0 +1,12 @@ +allowVolumeExpansion: true +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + annotations: + description: Provides RWO Filesystem volumes, and RWO and RWX Block volumes + storageclass.kubernetes.io/is-default-class: "true" + name: ocs-external-storagecluster-ceph-rbd +parameters: {} +provisioner: openshift-storage.rbd.csi.ceph.com +reclaimPolicy: Delete +volumeBindingMode: Immediate diff --git a/cluster-scope/bundles/odf-external/kustomization.yaml b/cluster-scope/bundles/odf-external/kustomization.yaml new file mode 100644 index 00000000..74501dfb --- /dev/null +++ b/cluster-scope/bundles/odf-external/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ../odf +- ../../base/odf.openshift.io/storagesystems/ocs-external-storagecluster-storagesystem +- ../../base/odf.openshift.io/storageclusters/ocs-external-storagecluster +- ../../base/storage.k8s.io/storageclasses/ocs-external-storagecluster-ceph-rbd diff --git a/cluster-scope/bundles/odf/kustomization.yaml b/cluster-scope/bundles/odf/kustomization.yaml index 286458af..4ce8ea21 100644 --- a/cluster-scope/bundles/odf/kustomization.yaml +++ b/cluster-scope/bundles/odf/kustomization.yaml @@ -5,3 +5,4 @@ resources: - ../../base/operators.coreos.com/operatorgroups/openshift-storage - ../../base/operators.coreos.com/subscriptions/odf-operator - ../../base/batch/jobs/odf-enable-console-plugin +- ../../base/ocs.openshift.io/ocsinitializations/ocsinit diff --git a/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml b/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml index 2f97cc35..fef742c8 100644 --- a/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml +++ b/cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml @@ -6,8 +6,8 @@ resources: - ../common - ../../bundles/openshift-gitops - ../../bundles/acm -- ../../bundles/odf - ../../base/operator.openshift.io/networks/cluster +- ../../bundles/odf-external - clusterversion.yaml - machineconfigs/disable-net-ifnames.yaml - machineconfigs/mellanox-udev-rules