You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A secondary control plane load balancer can be added.
* It will be a network load balancer.
* Its scheme must not match that of the ControlPlaneLoadBalancer.
Previously, NLBs could not have security groups attached. This has now
changed, and an NLB can have a security group attached at creation. If a
security group is _not_ present at creation, then the NLB can never have
security groups added.
allErrs=append(allErrs, field.Invalid(field.NewPath("additionalControlPlaneIngressRules"), r.Spec.NetworkSpec.AdditionalControlPlaneIngressRules, "CIDR blocks and security group IDs or security group roles cannot be used together"))
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "name"), r.Spec.SecondaryControlPlaneLoadBalancer.Name, "field must be different from controlPlaneLoadBalancer.name"))
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "scheme"), r.Spec.SecondaryControlPlaneLoadBalancer.Scheme, "control plane load balancers must have different schemes"))
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "secondaryControlPlaneLoadBalancer", "loadBalancerType"), r.Spec.SecondaryControlPlaneLoadBalancer.LoadBalancerType, "secondary control plane load balancer must be a Network Load Balancer"))
280
+
}
254
281
}
255
282
256
283
// Additional listeners are only supported for NLBs.
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "additionalListeners"), r.Spec.ControlPlaneLoadBalancer.AdditionalListeners, "additional listeners are only supported for NLB load balancers"))
if (rule.CidrBlocks!=nil||rule.IPv6CidrBlocks!=nil) && (rule.SourceSecurityGroupIDs!=nil||rule.SourceSecurityGroupRoles!=nil) {
265
-
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "ingressRules"), r.Spec.ControlPlaneLoadBalancer.IngressRules, "CIDR blocks and security group IDs or security group roles cannot be used together"))
294
+
for_, rule:=rangecp.IngressRules {
295
+
if (rule.CidrBlocks!=nil||rule.IPv6CidrBlocks!=nil) && (rule.SourceSecurityGroupIDs!=nil||rule.SourceSecurityGroupRoles!=nil) {
296
+
allErrs=append(allErrs, field.Invalid(field.NewPath("spec", "controlPlaneLoadBalancer", "ingressRules"), r.Spec.ControlPlaneLoadBalancer.IngressRules, "CIDR blocks and security group IDs or security group roles cannot be used together"))
0 commit comments