mirror of https://github.com/kubernetes/kops.git
Merge pull request #16358 from hakman/azure-subnet-vnet
azure: Avoid spurious changes in VirtualNetwork
This commit is contained in:
commit
5607c6689c
|
@ -36,7 +36,6 @@ type VirtualNetwork struct {
|
||||||
ResourceGroup *ResourceGroup
|
ResourceGroup *ResourceGroup
|
||||||
CIDR *string
|
CIDR *string
|
||||||
Tags map[string]*string
|
Tags map[string]*string
|
||||||
Subnets []*network.Subnet
|
|
||||||
Shared *bool
|
Shared *bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,9 +89,8 @@ func (n *VirtualNetwork) Find(c *fi.CloudupContext) (*VirtualNetwork, error) {
|
||||||
ResourceGroup: &ResourceGroup{
|
ResourceGroup: &ResourceGroup{
|
||||||
Name: n.ResourceGroup.Name,
|
Name: n.ResourceGroup.Name,
|
||||||
},
|
},
|
||||||
CIDR: addrPrefixes[0],
|
CIDR: addrPrefixes[0],
|
||||||
Tags: found.Tags,
|
Tags: found.Tags,
|
||||||
Subnets: found.Properties.Subnets,
|
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +142,6 @@ func (*VirtualNetwork) RenderAzure(t *azure.AzureAPITarget, a, e, changes *Virtu
|
||||||
AddressSpace: &network.AddressSpace{
|
AddressSpace: &network.AddressSpace{
|
||||||
AddressPrefixes: []*string{e.CIDR},
|
AddressPrefixes: []*string{e.CIDR},
|
||||||
},
|
},
|
||||||
Subnets: e.Subnets,
|
|
||||||
},
|
},
|
||||||
Tags: e.Tags,
|
Tags: e.Tags,
|
||||||
}
|
}
|
||||||
|
|
|
@ -696,8 +696,8 @@ func setupZones(opt *NewClusterOptions, cluster *api.Cluster, allZones sets.Stri
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// We create default subnets named the same as the regions
|
// We create default subnets named the same as the cluster
|
||||||
subnetName := location
|
subnetName := cluster.Name
|
||||||
|
|
||||||
subnet := model.FindSubnet(cluster, subnetName)
|
subnet := model.FindSubnet(cluster, subnetName)
|
||||||
if subnet == nil {
|
if subnet == nil {
|
||||||
|
|
Loading…
Reference in New Issue