Skip to content

Commit 836e8d2

Browse files
committed
Open konnectivity port
This updates all platforms to open the konnectivity port. Baremetal and on-prem platform have user-provisioned networks, so that will need be handled up front.
1 parent de4ebde commit 836e8d2

File tree

6 files changed

+61
-0
lines changed

6 files changed

+61
-0
lines changed

pkg/asset/manifests/aws/cluster.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ func GenerateClusterAssets(ic *installconfig.InstallConfig, clusterID *installco
141141
ToPort: 10259,
142142
SourceSecurityGroupRoles: []capa.SecurityGroupRole{"controlplane", "node"},
143143
},
144+
{
145+
Description: "Konnectivity agent traffic from cluster nodes",
146+
Protocol: capa.SecurityGroupProtocolTCP,
147+
FromPort: 8091,
148+
ToPort: 8091,
149+
SourceSecurityGroupRoles: []capa.SecurityGroupRole{"controlplane", "node"},
150+
},
144151
{
145152
Description: BootstrapSSHDescription,
146153
Protocol: capa.SecurityGroupProtocolTCP,

pkg/asset/manifests/azure/cluster.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ func GenerateClusterAssets(installConfig *installconfig.InstallConfig, clusterID
9393
Destination: ptr.To("*"),
9494
Action: capz.SecurityRuleActionAllow,
9595
},
96+
{
97+
Name: "konnectivity_in",
98+
Protocol: capz.SecurityGroupProtocolTCP,
99+
Direction: capz.SecurityRuleDirectionInbound,
100+
Priority: 103,
101+
SourcePorts: ptr.To("*"),
102+
DestinationPorts: ptr.To("8091"),
103+
Source: ptr.To(source),
104+
Destination: ptr.To("*"),
105+
Action: capz.SecurityRuleActionAllow,
106+
},
96107
{
97108
Name: fmt.Sprintf("%s_ssh_in", clusterID.InfraID),
98109
Protocol: capz.SecurityGroupProtocolTCP,

pkg/asset/manifests/ibmcloud/securitygroups.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,24 @@ func buildControlPlaneSecurityGroup(infraID string) capibmcloud.VPCSecurityGroup
421421
},
422422
},
423423
},
424+
{
425+
// Konnectivity
426+
Action: capibmcloud.VPCSecurityGroupRuleActionAllow,
427+
Direction: capibmcloud.VPCSecurityGroupRuleDirectionInbound,
428+
Source: &capibmcloud.VPCSecurityGroupRulePrototype{
429+
PortRange: &capibmcloud.VPCSecurityGroupPortRange{
430+
MaximumPort: 8091,
431+
MinimumPort: 8091,
432+
},
433+
Protocol: capibmcloud.VPCSecurityGroupRuleProtocolTCP,
434+
Remotes: []capibmcloud.VPCSecurityGroupRuleRemote{
435+
{
436+
RemoteType: capibmcloud.VPCSecurityGroupRuleRemoteTypeSG,
437+
SecurityGroupName: clusterWideSGNamePtr,
438+
},
439+
},
440+
},
441+
},
424442
},
425443
}
426444
}

pkg/asset/manifests/powervs/securitygroups.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ func buildControlPlaneSecurityGroup(infraID string) capibmcloud.VPCSecurityGroup
5050
},
5151
},
5252
},
53+
{
54+
// Konnectivity
55+
Action: capibmcloud.VPCSecurityGroupRuleActionAllow,
56+
Direction: capibmcloud.VPCSecurityGroupRuleDirectionInbound,
57+
Source: &capibmcloud.VPCSecurityGroupRulePrototype{
58+
PortRange: &capibmcloud.VPCSecurityGroupPortRange{
59+
MaximumPort: 8091,
60+
MinimumPort: 8091,
61+
},
62+
Protocol: capibmcloud.VPCSecurityGroupRuleProtocolTCP,
63+
Remotes: []capibmcloud.VPCSecurityGroupRuleRemote{
64+
{
65+
RemoteType: capibmcloud.VPCSecurityGroupRuleRemoteTypeAny,
66+
},
67+
},
68+
},
69+
},
5370
{
5471
Action: capibmcloud.VPCSecurityGroupRuleActionAllow,
5572
Direction: capibmcloud.VPCSecurityGroupRuleDirectionInbound,

pkg/infrastructure/gcp/clusterapi/firewallrules.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ func getControlPlanePorts() []*compute.FirewallAllowed {
5858
"10259", // Kube scheduler
5959
},
6060
},
61+
{
62+
IPProtocol: "tcp",
63+
Ports: []string{
64+
"8091", // Konnectivity
65+
},
66+
},
6167
}
6268
}
6369

pkg/infrastructure/openstack/preprovision/securitygroups.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ func SecurityGroups(ctx context.Context, installConfig *installconfig.InstallCon
138138
serviceIKENat = service{udp, 4500, 4500}
139139
serviceInternal = service{tcp | udp, 9000, 9999}
140140
serviceKCM = service{tcp, 10257, 10257}
141+
serviceKonnectivity = service{tcp, 8091, 8091}
141142
serviceKubeScheduler = service{tcp, 10259, 10259}
142143
serviceKubelet = service{tcp, 10250, 10250}
143144
serviceMCS = service{tcp, 22623, 22623}
@@ -234,6 +235,7 @@ func SecurityGroups(ctx context.Context, installConfig *installconfig.InstallCon
234235
addMasterRules(serviceDNS, ipVersion, CIDRs)
235236
addMasterRules(serviceETCD, ipVersion, CIDRs)
236237
addMasterRules(serviceKCM, ipVersion, CIDRs)
238+
addMasterRules(serviceKonnectivity, ipVersion, CIDRs)
237239
addMasterRules(serviceKubeScheduler, ipVersion, CIDRs)
238240
addMasterRules(serviceMCS, ipVersion, CIDRs)
239241
addMasterRules(serviceOVNDB, ipVersion, CIDRs)

0 commit comments

Comments
 (0)