File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
test/integration/cilium-nodesubnet Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,21 @@ func main() {
100100 }
101101
102102 if primaryIPConfig != nil {
103- for i := 2 ; i <= secondaryConfigCount + 1 ; i ++ {
103+ ipConfigurations = []interface {}{}
104+ for i := 1 ; i <= secondaryConfigCount + 1 ; i ++ {
104105 ipConfig := make (map [string ]interface {})
105106 for k , v := range primaryIPConfig {
107+ // Skip nil values.
108+ if v == nil {
109+ continue
110+ }
111+
106112 // only the primary config needs loadBalancerBackendAddressPools. Azure doesn't allow
107113 // secondary IP configs to be associated load balancer backend pools.
108- if k == "loadBalancerBackendAddressPools" {
114+ if i > 1 && k == "loadBalancerBackendAddressPools" {
109115 continue
110116 }
117+
111118 ipConfig [k ] = v
112119 }
113120
@@ -117,6 +124,8 @@ func main() {
117124 ipConfig ["primary" ] = false
118125 usedIPConfigNames = append (usedIPConfigNames , ipConfigName )
119126 secondaryConfigs = append (secondaryConfigs , ipConfig )
127+ } else {
128+ ipConfigurations = append (ipConfigurations , ipConfig )
120129 }
121130 }
122131 }
You can’t perform that action at this time.
0 commit comments