From dbfcef8c194b2e298efd8861a71190ad1379075f Mon Sep 17 00:00:00 2001 From: Travis Nielsen Date: Thu, 6 Feb 2020 13:48:52 -0700 Subject: [PATCH] ceph: set min size to 0 on pool replication The replication and erasure code settings are mutually exclusive so must both be treated as optional by the schema validation. The minimum must be set to 0 to treat them as optional. Signed-off-by: Travis Nielsen --- cluster/charts/rook-ceph/templates/resources.yaml | 12 ++++++++++-- cluster/examples/kubernetes/ceph/common.yaml | 12 ++++++++++-- .../kubernetes/ceph/upgrade-from-v1.1-crds.yaml | 12 ++++++++++-- tests/framework/installer/ceph_manifests.go | 12 ++++++++++-- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/cluster/charts/rook-ceph/templates/resources.yaml b/cluster/charts/rook-ceph/templates/resources.yaml index cc55096f9..c1c071f38 100644 --- a/cluster/charts/rook-ceph/templates/resources.yaml +++ b/cluster/charts/rook-ceph/templates/resources.yaml @@ -207,14 +207,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer dataPools: type: array @@ -225,14 +229,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer preservePoolsOnDelete: type: boolean diff --git a/cluster/examples/kubernetes/ceph/common.yaml b/cluster/examples/kubernetes/ceph/common.yaml index 8e24253de..473f17c3c 100644 --- a/cluster/examples/kubernetes/ceph/common.yaml +++ b/cluster/examples/kubernetes/ceph/common.yaml @@ -261,14 +261,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer dataPools: type: array @@ -279,14 +283,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer preservePoolsOnDelete: type: boolean diff --git a/cluster/examples/kubernetes/ceph/upgrade-from-v1.1-crds.yaml b/cluster/examples/kubernetes/ceph/upgrade-from-v1.1-crds.yaml index f06c4308d..42786cf1d 100644 --- a/cluster/examples/kubernetes/ceph/upgrade-from-v1.1-crds.yaml +++ b/cluster/examples/kubernetes/ceph/upgrade-from-v1.1-crds.yaml @@ -225,14 +225,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer dataPools: type: array @@ -243,14 +247,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer preservePoolsOnDelete: type: boolean diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index da22661a3..1bd2ec5f7 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -294,14 +294,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer dataPools: type: array @@ -312,14 +316,18 @@ spec: replicated: properties: size: - minimum: 1 + minimum: 0 maximum: 10 type: integer erasureCoded: properties: dataChunks: + minimum: 0 + maximum: 10 type: integer codingChunks: + minimum: 0 + maximum: 10 type: integer preservePoolsOnDelete: type: boolean