Skip to content

Commit

Permalink
remove no sfz validation (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-kun authored May 10, 2022
1 parent d6d0231 commit b254edb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions pkg/apis/openstack/validation/shoot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
Expand Down
13 changes: 0 additions & 13 deletions pkg/apis/openstack/validation/shoot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit b254edb

Please sign in to comment.