diff --git a/pkg/apis/ceph.rook.io/v1/object.go b/pkg/apis/ceph.rook.io/v1/object.go index 23d787147..47161d3cc 100644 --- a/pkg/apis/ceph.rook.io/v1/object.go +++ b/pkg/apis/ceph.rook.io/v1/object.go @@ -81,8 +81,15 @@ func ValidateObjectSpec(gs *CephObjectStore) error { if gs.Namespace == "" { return errors.New("missing namespace") } - if len(gs.Name) > objectStoreNameMaxLen { - return errors.New("object store name cannot be longer than 38 characters") + + // validate the object store name only if it is not an external cluster + // as external cluster won't create the rgw daemon and it's other resources + // and there is some legacy external cluster which has more length of objectstore + // so to run them successfully we are not validating the objectstore name + if !gs.Spec.IsExternal() { + if len(gs.Name) > objectStoreNameMaxLen { + return errors.New("object store name cannot be longer than 38 characters") + } } securePort := gs.Spec.Gateway.SecurePort if securePort < 0 || securePort > 65535 {