remove cadvisor and etcd client fw rule

This commit is contained in:
Jesse Haka 2023-02-13 09:26:44 +02:00
parent bd0a779287
commit ff557a9cf1
1 changed files with 0 additions and 20 deletions

View File

@ -148,9 +148,7 @@ func (b *FirewallModelBuilder) addSSHRules(c *fi.CloudupModelBuilderContext, sgM
// addETCDRules - Add ETCD access rules based on which CNI might need to access __ETCD_ENDPOINTS__ // addETCDRules - Add ETCD access rules based on which CNI might need to access __ETCD_ENDPOINTS__
func (b *FirewallModelBuilder) addETCDRules(c *fi.CloudupModelBuilderContext, sgMap map[string]*openstacktasks.SecurityGroup) error { func (b *FirewallModelBuilder) addETCDRules(c *fi.CloudupModelBuilderContext, sgMap map[string]*openstacktasks.SecurityGroup) error {
masterName := b.SecurityGroupName(kops.InstanceGroupRoleControlPlane) masterName := b.SecurityGroupName(kops.InstanceGroupRoleControlPlane)
nodeName := b.SecurityGroupName(kops.InstanceGroupRoleNode)
masterSG := sgMap[masterName] masterSG := sgMap[masterName]
nodeSG := sgMap[nodeName]
// ETCD Peer Discovery // ETCD Peer Discovery
etcdRule := &openstacktasks.SecurityGroupRule{ etcdRule := &openstacktasks.SecurityGroupRule{
@ -183,21 +181,6 @@ func (b *FirewallModelBuilder) addETCDRules(c *fi.CloudupModelBuilderContext, sg
} }
b.addDirectionalGroupRule(c, masterSG, masterSG, etcdMgmrRule) b.addDirectionalGroupRule(c, masterSG, masterSG, etcdMgmrRule)
} }
if b.Cluster.Spec.Networking.Calico != nil {
etcdCNIRule := &openstacktasks.SecurityGroupRule{
Lifecycle: b.Lifecycle,
Direction: s(string(rules.DirIngress)),
Protocol: s(string(rules.ProtocolTCP)),
EtherType: s(IPV4),
PortRangeMin: i(4001),
PortRangeMax: i(4001),
}
// Master access from other masters covered above
// Allow nodes to reach ETCD endpoints
b.addDirectionalGroupRule(c, masterSG, nodeSG, etcdCNIRule)
}
return nil return nil
} }
@ -409,9 +392,6 @@ func (b *FirewallModelBuilder) addCNIRules(c *fi.CloudupModelBuilderContext, sgM
tcpPorts := []int{} tcpPorts := []int{}
protocols := []string{} protocols := []string{}
// allow cadvisor
tcpPorts = append(tcpPorts, 4194)
if b.Cluster.Spec.Networking.Kopeio != nil { if b.Cluster.Spec.Networking.Kopeio != nil {
// VXLAN over UDP // VXLAN over UDP
// https://tools.ietf.org/html/rfc7348 // https://tools.ietf.org/html/rfc7348