diff --git a/cluster/charts/rook-ceph/templates/resources.yaml b/cluster/charts/rook-ceph/templates/resources.yaml index 44f2414e6..7ef572e62 100644 --- a/cluster/charts/rook-ceph/templates/resources.yaml +++ b/cluster/charts/rook-ceph/templates/resources.yaml @@ -306,11 +306,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 e8901cb04..27c0afb1f 100644 --- a/cluster/examples/kubernetes/ceph/common.yaml +++ b/cluster/examples/kubernetes/ceph/common.yaml @@ -360,11 +360,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 681cbbbf0..bd78f0d3d 100644 --- a/pkg/operator/ceph/object/rgw.go +++ b/pkg/operator/ceph/object/rgw.go @@ -349,6 +349,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 f62eba3a5..8199ec97c 100644 --- a/tests/framework/installer/ceph_manifests.go +++ b/tests/framework/installer/ceph_manifests.go @@ -379,11 +379,7 @@ spec: type: integer minimum: 1 maximum: 65535 - securePort: - type: integer - minimum: 1 - maximum: 65535 - nullable: true + securePort: {} instances: type: integer annotations: {}