ceph: remove validation on SecurePort for k8s <= 1.13

Versions of k8s prior to 1.14 do not support the nullable field in
CRD properties. As k8s 1.13 remains part of our support matrix and
as this field must remain nullable, we must remove CRD validation
of SecurePort. Range validation of this field has been moved into
the logic of rgw.validateStore.

Fixes: #4693
Signed-off-by: Elise Gafford <egafford@redhat.com>
This commit is contained in:
Elise Gafford committed 2020-01-27 13:49:35 -05:00
1 parent 749ef5fe76
commit d7906266e1
5 files changed
+8 -20

No files matched your search

@@ -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: {}
+1 -5
View File
@@ -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: {}
@@ -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: {}
+4
View File
@@ -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")
}
+1 -5
View File
@@ -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: {}