diff --git a/cluster/charts/rook-ceph/templates/resources.yaml b/cluster/charts/rook-ceph/templates/resources.yaml index c40f90701..cdcbd582a 100644 --- a/cluster/charts/rook-ceph/templates/resources.yaml +++ b/cluster/charts/rook-ceph/templates/resources.yaml @@ -318,11 +318,7 @@ spec: type: integer minimum: 1 maximum: 65535 - securePort: - type: integer - minimum: 1 - maximum: 65535 - nullable: true + securePort: {} instances: type: integer annotations: {} diff --git a/cluster/examples/kubernetes/ceph/common.yaml b/cluster/examples/kubernetes/ceph/common.yaml index 1731f906a..23b06d6ef 100644 --- a/cluster/examples/kubernetes/ceph/common.yaml +++ b/cluster/examples/kubernetes/ceph/common.yaml @@ -372,11 +372,7 @@ spec: type: integer minimum: 1 maximum: 65535 - securePort: - type: integer - minimum: 1 - maximum: 65535 - nullable: true + securePort: {} instances: type: integer annotations: {} 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 58e54d4cf..f06c4308d 100644 --- a/cluster/examples/kubernetes/ceph/upgrade-from-v1.1-crds.yaml +++ b/cluster/examples/kubernetes/ceph/upgrade-from-v1.1-crds.yaml @@ -290,11 +290,7 @@ spec: type: integer minimum: 1 maximum: 65535 - securePort: - type: integer - minimum: 1 - maximum: 65535 - nullable: true + securePort: {} instances: type: integer annotations: {} diff --git a/pkg/operator/ceph/object/rgw.go b/pkg/operator/ceph/object/rgw.go index d658f2ee0..b7ef78749 100644 --- a/pkg/operator/ceph/object/rgw.go +++ b/pkg/operator/ceph/object/rgw.go @@ -342,6 +342,10 @@ func validateStore(context *clusterd.Context, s cephv1.CephObjectStore) error { if s.Namespace == "" { return errors.New("missing namespace") } + securePort := s.Spec.Gateway.SecurePort + if securePort < 0 || securePort > 65535 { + return errors.Errorf("securePort value of %d must be between 0 and 65535", securePort) + } if err := pool.ValidatePoolSpec(context, s.Namespace, &s.Spec.MetadataPool); err != nil { return errors.Wrapf(err, "invalid metadata pool spec") } diff --git a/tests/framework/installer/ceph_manifests.go b/tests/framework/installer/ceph_manifests.go index 82fa26942..188a5151c 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -391,11 +391,7 @@ spec: type: integer minimum: 1 maximum: 65535 - securePort: - type: integer - minimum: 1 - maximum: 65535 - nullable: true + securePort: {} instances: type: integer annotations: {}