func (b *FirewallModelBuilder) addProtokubeRules(c *fi.ModelBuilderContext, sgMap map[string]*openstacktasks.SecurityGroup) error {

	if dns.IsGossipHostname(b.ClusterName()) {
		masterName := b.SecurityGroupName(kops.InstanceGroupRoleMaster)
		nodeName := b.SecurityGroupName(kops.InstanceGroupRoleNode)
		masterSG := sgMap[masterName]
		nodeSG := sgMap[nodeName]
		protokubeRule := &openstacktasks.SecurityGroupRule{
			Lifecycle:    b.Lifecycle,
			Direction:    s(string(rules.DirIngress)),
			Protocol:     s(string(rules.ProtocolTCP)),
			EtherType:    s(string(rules.EtherType4)),
			PortRangeMin: i(3994),
			PortRangeMax: i(3999),
		}
		addDirectionalGroupRule(c, masterSG, nodeSG, protokubeRule)
		addDirectionalGroupRule(c, nodeSG, masterSG, protokubeRule)
		addDirectionalGroupRule(c, masterSG, masterSG, protokubeRule)
		addDirectionalGroupRule(c, nodeSG, nodeSG, protokubeRule)
	}
	return nil
}
// addProtokubeRules - Add rules for protokube if gossip DNS is enabled
Add rules for protokube if gossip DNS is enabled
// addProtokubeRules - Add rules for protokube if gossip DNS is enabled
func (b *FirewallModelBuilder) addProtokubeRules(c *fi.ModelBuilderContext, sgMap map[string]*openstacktasks.SecurityGroup) error {
	if dns.IsGossipHostname(b.ClusterName()) {
		masterName := b.SecurityGroupName(kops.InstanceGroupRoleMaster)
		nodeName := b.SecurityGroupName(kops.InstanceGroupRoleNode)
		masterSG := sgMap[masterName]
		nodeSG := sgMap[nodeName]
		protokubeRule := &openstacktasks.SecurityGroupRule{
			Lifecycle:    b.Lifecycle,
			Direction:    s(string(rules.DirIngress)),
			Protocol:     s(string(rules.ProtocolTCP)),
			EtherType:    s(string(rules.EtherType4)),
			PortRangeMin: i(3994),
			PortRangeMax: i(3999),
		}
		addDirectionalGroupRule(c, masterSG, nodeSG, protokubeRule)
		addDirectionalGroupRule(c, nodeSG, masterSG, protokubeRule)
		addDirectionalGroupRule(c, masterSG, masterSG, protokubeRule)
		addDirectionalGroupRule(c, nodeSG, nodeSG, protokubeRule)
	}
	return nil
}
func ( b * FirewallModelBuilder ) addProtokubeRules ( c * fi . ModelBuilderContext , sgMap map [ string ] * openstacktasks . SecurityGroup ) error { if dns . IsGossipHostname ( b . ClusterName ( ) ) { masterName := b . SecurityGroupName ( kops . InstanceGroupRoleMaster ) nodeName := b . SecurityGroupName ( kops . InstanceGroupRoleNode ) masterSG := sgMap [ masterName ] nodeSG := sgMap [ nodeName ] protokubeRule := & openstacktasks . SecurityGroupRule { Lifecycle : b . Lifecycle , Direction : s ( string ( rules . DirIngress ) ) , Protocol : s ( string ( rules . ProtocolTCP ) ) , EtherType : s ( string ( rules . EtherType4 ) ) , PortRangeMin : i ( 3994 ) , PortRangeMax : i ( 3999 ) , } addDirectionalGroupRule ( c , masterSG , nodeSG , protokubeRule ) addDirectionalGroupRule ( c , nodeSG , masterSG , protokubeRule ) addDirectionalGroupRule ( c , masterSG , masterSG , protokubeRule ) addDirectionalGroupRule ( c , nodeSG , nodeSG , protokubeRule ) } return nil }
Add rules for protokube if gossip DNS is enabled
Add rules for protokube if gossip DNS is enabled