Skip to content

Commit cb3973c

Browse files
committed
PowerVC: Validate Manual Load Balancer
If the user specifies using an OpenStack managed Load Balancer, then the VIP can be in the MachineNetwork allocation pool.
1 parent 5684032 commit cb3973c

File tree

1 file changed

+6
-0
lines changed
  • pkg/asset/installconfig/openstack/validation

1 file changed

+6
-0
lines changed

pkg/asset/installconfig/openstack/validation/platform.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"k8s.io/apimachinery/pkg/util/validation/field"
1212
utilsslice "k8s.io/utils/strings/slices"
1313

14+
configv1 "github.com/openshift/api/config/v1"
1415
"github.com/openshift/installer/pkg/types"
1516
"github.com/openshift/installer/pkg/types/openstack"
1617
)
@@ -165,6 +166,11 @@ func validateFloatingIPs(p *openstack.Platform, ci *CloudInfo, fldPath *field.Pa
165166
// platform VIP validation is done in pkg/types/validation/installconfig.go,
166167
// validateAPIAndIngressVIPs().
167168
func validateVIPs(p *openstack.Platform, ci *CloudInfo, fldPath *field.Path) (allErrs field.ErrorList) {
169+
// If the user specifies using a managed Load Balancer, then the VIP can be in the MachineNetwork allocation pool.
170+
if p.LoadBalancer != nil && p.LoadBalancer.Type == configv1.LoadBalancerTypeUserManaged {
171+
return allErrs
172+
}
173+
168174
// If the subnet is not found in the CloudInfo object, abandon validation.
169175
// For dual-stack and single-stack IPv6 the user needs to pre-create the Port for API and Ingress, so no need for validation.
170176

0 commit comments

Comments
 (0)