mirror of https://github.com/kubernetes/kops.git
azure: Perform challenge callbacks into a node
This commit is contained in:
parent
5356b028f1
commit
c4ec894578
|
|
@ -31,6 +31,8 @@ func UseChallengeCallback(cloudProvider kops.CloudProviderID) bool {
|
||||||
return true
|
return true
|
||||||
case kops.CloudProviderScaleway:
|
case kops.CloudProviderScaleway:
|
||||||
return true
|
return true
|
||||||
|
case kops.CloudProviderAzure:
|
||||||
|
return true
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,17 @@ func (b *NetworkModelBuilder) Build(c *fi.CloudupModelBuilderContext) error {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
nsgTask.SecurityRules = append(nsgTask.SecurityRules, &azuretasks.NetworkSecurityRule{
|
||||||
|
Name: fi.PtrTo("AllowNodeupChallenge"),
|
||||||
|
Priority: fi.PtrTo[int32](220),
|
||||||
|
Access: network.SecurityRuleAccessAllow,
|
||||||
|
Direction: network.SecurityRuleDirectionInbound,
|
||||||
|
Protocol: network.SecurityRuleProtocolTCP,
|
||||||
|
SourceAddressPrefix: fi.PtrTo(b.Cluster.Spec.Networking.NetworkCIDR),
|
||||||
|
SourcePortRange: fi.PtrTo("*"),
|
||||||
|
DestinationAddressPrefix: fi.PtrTo("*"),
|
||||||
|
DestinationPortRange: fi.PtrTo(strconv.Itoa(wellknownports.NodeupChallenge)),
|
||||||
|
})
|
||||||
var nodePortAccessIPv4, nodePortAccessIPv6 []string
|
var nodePortAccessIPv4, nodePortAccessIPv6 []string
|
||||||
for _, cidr := range b.Cluster.Spec.NodePortAccess {
|
for _, cidr := range b.Cluster.Spec.NodePortAccess {
|
||||||
switch net.IPFamilyOfCIDRString(cidr) {
|
switch net.IPFamilyOfCIDRString(cidr) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue