Skip to content

Commit 927a8f2

Browse files
Merge pull request #8101 from mkowalski/OPNET-476
OPNET-476: GA Load balancer feature for vSphere and Baremetal
2 parents 96bc7e8 + f5811d9 commit 927a8f2

File tree

4 files changed

+0
-37
lines changed

4 files changed

+0
-37
lines changed

pkg/types/baremetal/validation/platform.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,6 @@ func ValidatePlatform(p *baremetal.Platform, agentBasedInstallation bool, n *typ
457457
allErrs = append(allErrs, validateHostsName(p.Hosts, fldPath.Child("Hosts"))...)
458458
}
459459

460-
// Platform fields only allowed in TechPreviewNoUpgrade
461-
if c.FeatureSet != configv1.TechPreviewNoUpgrade {
462-
if c.BareMetal.LoadBalancer != nil {
463-
allErrs = append(allErrs, field.Forbidden(fldPath.Child("loadBalancer"), "load balancer is not supported in this feature set"))
464-
}
465-
}
466-
467460
if c.BareMetal.LoadBalancer != nil {
468461
if !validateLoadBalancer(c.BareMetal.LoadBalancer.Type) {
469462
allErrs = append(allErrs, field.Invalid(fldPath.Child("loadBalancer", "type"), c.BareMetal.LoadBalancer.Type, "invalid load balancer type"))

pkg/types/baremetal/validation/platform_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,6 @@ func TestValidatePlatform(t *testing.T) {
181181
ControlPlane(machinePool().Replicas(1)).build(),
182182
expected: "baremetal.hosts\\[0\\].Name: Required value: missing Name",
183183
},
184-
{
185-
name: "forbidden_feature_loadbalancer",
186-
config: installConfig().
187-
BareMetalPlatform(
188-
platform().LoadBalancerType("OpenShiftManagedDefault")).build(),
189-
expected: "baremetal.loadBalancer: Forbidden: load balancer is not supported in this feature set",
190-
},
191184
{
192185
name: "allowed_feature_loadbalancer_openshift_managed_default",
193186
config: installConfig().

pkg/types/vsphere/validation/platform.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ func ValidatePlatform(p *vsphere.Platform, agentBasedInstallation bool, fldPath
7373
}
7474
}
7575

76-
// Platform fields only allowed in TechPreviewNoUpgrade
77-
if c.FeatureSet != configv1.TechPreviewNoUpgrade {
78-
if c.VSphere.LoadBalancer != nil {
79-
allErrs = append(allErrs, field.Forbidden(fldPath.Child("loadBalancer"), "load balancer is not supported in this feature set"))
80-
}
81-
}
82-
8376
if c.VSphere.LoadBalancer != nil {
8477
if !validateLoadBalancer(c.VSphere.LoadBalancer.Type) {
8578
allErrs = append(allErrs, field.Invalid(fldPath.Child("loadBalancer", "type"), c.VSphere.LoadBalancer.Type, "invalid load balancer type"))

pkg/types/vsphere/validation/platform_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -360,22 +360,6 @@ func TestValidatePlatform(t *testing.T) {
360360
}(),
361361
expectedError: `^test-path\.failureDomains\.zone: Required value: must specify zone tag value`,
362362
},
363-
{
364-
name: "forbidden load balancer field",
365-
platform: validPlatform(),
366-
config: &types.InstallConfig{
367-
Platform: types.Platform{
368-
VSphere: func() *vsphere.Platform {
369-
p := validPlatform()
370-
p.LoadBalancer = &configv1.VSpherePlatformLoadBalancer{
371-
Type: configv1.LoadBalancerTypeOpenShiftManagedDefault,
372-
}
373-
return p
374-
}(),
375-
},
376-
},
377-
expectedError: `^test-path\.loadBalancer: Forbidden: load balancer is not supported in this feature set`,
378-
},
379363
{
380364
name: "allowed load balancer field with OpenShift managed default",
381365
platform: validPlatform(),

0 commit comments

Comments
 (0)