mirror of https://github.com/kubernetes/kops.git
fix firewalls for openstack
This commit is contained in:
parent
1c37a328e1
commit
a09a920e92
|
@ -151,6 +151,18 @@ func (b *FirewallModelBuilder) addETCDRules(c *fi.ModelBuilderContext, sgMap map
|
|||
addDirectionalGroupRule(c, masterSG, masterSG, etcdRule)
|
||||
addDirectionalGroupRule(c, masterSG, masterSG, etcdPeerRule)
|
||||
|
||||
for _, portRange := range wellknownports.ETCDPortRanges() {
|
||||
etcdMgmrRule := &openstacktasks.SecurityGroupRule{
|
||||
Lifecycle: b.Lifecycle,
|
||||
Direction: s(string(rules.DirIngress)),
|
||||
Protocol: s(string(rules.ProtocolTCP)),
|
||||
EtherType: s(string(rules.EtherType4)),
|
||||
PortRangeMin: i(portRange.Min),
|
||||
PortRangeMax: i(portRange.Max),
|
||||
}
|
||||
addDirectionalGroupRule(c, masterSG, masterSG, etcdMgmrRule)
|
||||
}
|
||||
|
||||
if b.Cluster.Spec.Networking.Romana != nil ||
|
||||
b.Cluster.Spec.Networking.Calico != nil {
|
||||
|
||||
|
|
|
@ -54,3 +54,9 @@ func DNSGossipPortRanges() []PortRange {
|
|||
{Min: 3998, Max: 4000},
|
||||
}
|
||||
}
|
||||
|
||||
func ETCDPortRanges() []PortRange {
|
||||
return []PortRange{
|
||||
{Min: 3994, Max: 3997},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue