mirror of https://github.com/kubernetes/kops.git
				
				
				
			Merge pull request #12412 from olemarkus/nlb-add-subnet
Allow adding more subnets to an NLB
This commit is contained in:
		
						commit
						93dc3b907c
					
				|  | @ -460,7 +460,7 @@ func (e *NetworkLoadBalancer) Normalize() { | ||||||
| 	sort.Stable(OrderTargetGroupsByName(e.TargetGroups)) | 	sort.Stable(OrderTargetGroupsByName(e.TargetGroups)) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (s *NetworkLoadBalancer) CheckChanges(a, e, changes *NetworkLoadBalancer) error { | func (*NetworkLoadBalancer) CheckChanges(a, e, changes *NetworkLoadBalancer) error { | ||||||
| 	if a == nil { | 	if a == nil { | ||||||
| 		if fi.StringValue(e.Name) == "" { | 		if fi.StringValue(e.Name) == "" { | ||||||
| 			return fi.RequiredField("Name") | 			return fi.RequiredField("Name") | ||||||
|  | @ -489,12 +489,12 @@ func (s *NetworkLoadBalancer) CheckChanges(a, e, changes *NetworkLoadBalancer) e | ||||||
| 		if len(changes.SubnetMappings) > 0 { | 		if len(changes.SubnetMappings) > 0 { | ||||||
| 			expectedSubnets := make(map[string]*string) | 			expectedSubnets := make(map[string]*string) | ||||||
| 			for _, s := range e.SubnetMappings { | 			for _, s := range e.SubnetMappings { | ||||||
| 				//expectedSubnets[*s.Subnet.ID] = s
 |  | ||||||
| 				if s.AllocationID != nil { | 				if s.AllocationID != nil { | ||||||
| 					expectedSubnets[*s.Subnet.ID] = s.AllocationID | 					expectedSubnets[*s.Subnet.ID] = s.AllocationID | ||||||
| 				} | 				} else if s.PrivateIPv4Address != nil { | ||||||
| 				if s.PrivateIPv4Address != nil { |  | ||||||
| 					expectedSubnets[*s.Subnet.ID] = s.PrivateIPv4Address | 					expectedSubnets[*s.Subnet.ID] = s.PrivateIPv4Address | ||||||
|  | 				} else { | ||||||
|  | 					expectedSubnets[*s.Subnet.ID] = nil | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue