func (b *FirewallModelBuilder) addNodeExporterRules(c *fi.ModelBuilderContext, sgMap map[string]*openstacktasks.SecurityGroup) error {
	masterName := b.SecurityGroupName(kops.InstanceGroupRoleMaster)
	nodeName := b.SecurityGroupName(kops.InstanceGroupRoleNode)
	masterSG := sgMap[masterName]
	nodeSG := sgMap[nodeName]
	nodeExporterIngress := &openstacktasks.SecurityGroupRule{
		Lifecycle:    b.Lifecycle,
		Direction:    s(string(rules.DirIngress)),
		Protocol:     s(IPProtocolTCP),
		EtherType:    s(IPV4),
		PortRangeMin: i(9100),
		PortRangeMax: i(9100),
	}
	// allow 9100 port from nodeSG
	addDirectionalGroupRule(c, masterSG, nodeSG, nodeExporterIngress)
	addDirectionalGroupRule(c, nodeSG, nodeSG, nodeExporterIngress)
	return nil
}
// addNodeExporterRules - Allow 9100 TCP port from nodesg
Allow 9100 TCP port from nodesg
// addNodeExporterRules - Allow 9100 TCP port from nodesg
func (b *FirewallModelBuilder) addNodeExporterRules(c *fi.ModelBuilderContext, sgMap map[string]*openstacktasks.SecurityGroup) error {
	masterName := b.SecurityGroupName(kops.InstanceGroupRoleMaster)
	nodeName := b.SecurityGroupName(kops.InstanceGroupRoleNode)
	masterSG := sgMap[masterName]
	nodeSG := sgMap[nodeName]
	nodeExporterIngress := &openstacktasks.SecurityGroupRule{
		Lifecycle:    b.Lifecycle,
		Direction:    s(string(rules.DirIngress)),
		Protocol:     s(IPProtocolTCP),
		EtherType:    s(IPV4),
		PortRangeMin: i(9100),
		PortRangeMax: i(9100),
	}
	addDirectionalGroupRule(c, masterSG, nodeSG, nodeExporterIngress)
	addDirectionalGroupRule(c, nodeSG, nodeSG, nodeExporterIngress)
	return nil
}
func ( b * FirewallModelBuilder ) addNodeExporterRules ( c * fi . ModelBuilderContext , sgMap map [ string ] * openstacktasks . SecurityGroup ) error { masterName := b . SecurityGroupName ( kops . InstanceGroupRoleMaster ) nodeName := b . SecurityGroupName ( kops . InstanceGroupRoleNode ) masterSG := sgMap [ masterName ] nodeSG := sgMap [ nodeName ] nodeExporterIngress := & openstacktasks . SecurityGroupRule { Lifecycle : b . Lifecycle , Direction : s ( string ( rules . DirIngress ) ) , Protocol : s ( IPProtocolTCP ) , EtherType : s ( IPV4 ) , PortRangeMin : i ( 9100 ) , PortRangeMax : i ( 9100 ) , } addDirectionalGroupRule ( c , masterSG , nodeSG , nodeExporterIngress ) addDirectionalGroupRule ( c , nodeSG , nodeSG , nodeExporterIngress ) return nil }
Allow 9100 TCP port from nodesg
Allow 9100 TCP port from nodesg
// allow 9100 port from nodeSG