From b254edb8135c1532955641a60563bf44c79af628 Mon Sep 17 00:00:00 2001 From: Himanshu Sharma <79965161+himanshu-kun@users.noreply.github.com> Date: Tue, 10 May 2022 13:40:34 +0530 Subject: [PATCH] remove no sfz validation (#445) --- pkg/apis/openstack/validation/shoot.go | 4 ---- pkg/apis/openstack/validation/shoot_test.go | 13 ------------- 2 files changed, 17 deletions(-) diff --git a/pkg/apis/openstack/validation/shoot.go b/pkg/apis/openstack/validation/shoot.go index 42a11c950..67b3a6ee5 100644 --- a/pkg/apis/openstack/validation/shoot.go +++ b/pkg/apis/openstack/validation/shoot.go @@ -96,10 +96,6 @@ func ValidateWorkers(workers []core.Worker, cloudProfileCfg *api.CloudProfileCon continue } - if worker.Maximum != 0 && worker.Minimum == 0 { - allErrs = append(allErrs, field.Forbidden(workerFldPath.Child("minimum"), "minimum value must be >= 1 if maximum value > 0 (auto scaling to 0 is not supported)")) - } - if worker.Volume != nil && worker.Volume.Type != nil && worker.Volume.VolumeSize == "" { allErrs = append(allErrs, field.Forbidden(workerFldPath.Child("volume", "type"), "specifying volume type without a custom volume size is not allowed")) } diff --git a/pkg/apis/openstack/validation/shoot_test.go b/pkg/apis/openstack/validation/shoot_test.go index b415d8fc9..a995b01a5 100644 --- a/pkg/apis/openstack/validation/shoot_test.go +++ b/pkg/apis/openstack/validation/shoot_test.go @@ -170,19 +170,6 @@ var _ = Describe("Shoot validation", func() { )) }) - It("should enforce workers min > 0 if max > 0", func() { - workers[0].Minimum = 0 - - errorList := ValidateWorkers(workers, nil, nilPath) - - Expect(errorList).To(ConsistOf( - PointTo(MatchFields(IgnoreExtras, Fields{ - "Type": Equal(field.ErrorTypeForbidden), - "Field": Equal("[0].minimum"), - })), - )) - }) - It("should forbid specifying volume type without size", func() { workers[0].Volume = &core.Volume{ Type: pointer.String("standard"),