mirror of https://github.com/kubernetes/kops.git
upup: fix dryrun when adding a subnet
When adding a subnet in --dryrun, the ID might not be set during a Find
This commit is contained in:
parent
a10c76a954
commit
b147091e5c
|
@ -124,6 +124,10 @@ func subnetSlicesEqualIgnoreOrder(l, r []*Subnet) bool {
|
|||
}
|
||||
var rIDs []string
|
||||
for _, s := range r {
|
||||
if s.ID == nil {
|
||||
glog.V(4).Infof("Subnet ID not set; returning not-equal: %v", s)
|
||||
return false
|
||||
}
|
||||
rIDs = append(rIDs, *s.ID)
|
||||
}
|
||||
return utils.StringSlicesEqualIgnoreOrder(lIDs, rIDs)
|
||||
|
|
Loading…
Reference in New Issue