From d764af8d11cfbe82d1dfb32d97358362ece4d67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 3 Jun 2021 11:56:21 +0200 Subject: [PATCH] ceph: fix external cluster upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both MonSpec.Count and CephVersionSpec.Image should be optional for the external cluster. So marking them as so. Signed-off-by: Sébastien Han --- cluster/charts/rook-ceph/templates/resources.yaml | 4 ---- cluster/examples/kubernetes/ceph/crds.yaml | 4 ---- pkg/apis/ceph.rook.io/v1/types.go | 6 ++++-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/cluster/charts/rook-ceph/templates/resources.yaml b/cluster/charts/rook-ceph/templates/resources.yaml index 89a68257c..2495960da 100644 --- a/cluster/charts/rook-ceph/templates/resources.yaml +++ b/cluster/charts/rook-ceph/templates/resources.yaml @@ -479,8 +479,6 @@ spec: image: description: Image is the container image used to launch the ceph daemons, such as ceph/ceph:v16.2.4 type: string - required: - - image type: object cleanupPolicy: description: Indicates user intent when deleting a cluster; blocks orchestration and should not be set if cluster deletion is not imminent. @@ -1142,8 +1140,6 @@ spec: type: object type: object x-kubernetes-preserve-unknown-fields: true - required: - - count type: object monitoring: description: Prometheus based Monitoring settings diff --git a/cluster/examples/kubernetes/ceph/crds.yaml b/cluster/examples/kubernetes/ceph/crds.yaml index 78834e9cf..5485c0914 100644 --- a/cluster/examples/kubernetes/ceph/crds.yaml +++ b/cluster/examples/kubernetes/ceph/crds.yaml @@ -479,8 +479,6 @@ spec: image: description: Image is the container image used to launch the ceph daemons, such as ceph/ceph:v16.2.4 type: string - required: - - image type: object cleanupPolicy: description: Indicates user intent when deleting a cluster; blocks orchestration and should not be set if cluster deletion is not imminent. @@ -1142,8 +1140,6 @@ spec: type: object type: object x-kubernetes-preserve-unknown-fields: true - required: - - count type: object monitoring: description: Prometheus based Monitoring settings diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index 037ac75c6..ae3d15baf 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -252,7 +252,8 @@ type KeyManagementServiceSpec struct { // CephVersionSpec represents the settings for the Ceph version that Rook is orchestrating. type CephVersionSpec struct { // Image is the container image used to launch the ceph daemons, such as ceph/ceph:v16.2.4 - Image string `json:"image"` + // +optional + Image string `json:"image,omitempty"` // Whether to allow unsupported versions (do not set to true in production) // +optional @@ -448,7 +449,8 @@ const ( type MonSpec struct { // Count is the number of Ceph monitors // +kubebuilder:validation:Minimum=0 - Count int `json:"count"` + // +optional + Count int `json:"count,omitempty"` // AllowMultiplePerNode determines if we can run multiple monitors on the same node (not recommended) // +optional AllowMultiplePerNode bool `json:"allowMultiplePerNode,omitempty"`