Skip to content

Commit e2a33a4

Browse files
author
Matt Pryor
committed
Implement allowAllInClusterTraffic flag
1 parent 35351cb commit e2a33a4

File tree

4 files changed

+230
-153
lines changed

4 files changed

+230
-153
lines changed

api/v1alpha4/openstackcluster_types.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,21 @@ type OpenStackClusterSpec struct {
7575
// APIServerLoadBalancerAdditionalPorts adds additional ports to the APIServerLoadBalancer
7676
APIServerLoadBalancerAdditionalPorts []int `json:"apiServerLoadBalancerAdditionalPorts,omitempty"`
7777

78-
// ManagedSecurityGroups defines that kubernetes manages the OpenStack security groups
79-
// for now, that means that we'll create security group allows traffic to/from
80-
// machines belonging to that group based on Calico CNI plugin default network
81-
// requirements: BGP and IP-in-IP for master node(s) and worker node(s) respectively.
82-
// In the future, we could make this more flexible.
78+
// ManagedSecurityGroups determines whether OpenStack security groups for the cluster
79+
// will be managed by the OpenStack provider or whether pre-existing security groups will
80+
// be specified as part of the configuration.
81+
// By default, the managed security groups have rules that allow the Kubelet, etcd, the
82+
// Kubernetes API server and the Calico CNI plugin to function correctly.
8383
// +optional
8484
ManagedSecurityGroups bool `json:"managedSecurityGroups"`
8585

86+
// AllowAllInClusterTraffic is only used when managed security groups are in use.
87+
// If set to true, the rules for the managed security groups are configured so that all
88+
// ingress and egress between cluster nodes is permitted, allowing CNIs other than
89+
// Calico to be used.
90+
// +optional
91+
AllowAllInClusterTraffic bool `json:"allowAllInClusterTraffic"`
92+
8693
// DisablePortSecurity disables the port security of the network created for the
8794
// Kubernetes cluster, which also disables SecurityGroups
8895
DisablePortSecurity bool `json:"disablePortSecurity,omitempty"`

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,12 @@ spec:
10721072
spec:
10731073
description: OpenStackClusterSpec defines the desired state of OpenStackCluster.
10741074
properties:
1075+
allowAllInClusterTraffic:
1076+
description: AllowAllInClusterTraffic is only used when managed security
1077+
groups are in use. If set to true, the rules for the managed security
1078+
groups are configured so that all ingress and egress between cluster
1079+
nodes is permitted, allowing CNIs other than Calico to be used.
1080+
type: boolean
10751081
apiServerFloatingIP:
10761082
description: APIServerFloatingIP is the floatingIP which will be associated
10771083
to the APIServer. The floatingIP will be created if it not already
@@ -1553,12 +1559,12 @@ spec:
15531559
properties are mandatory: APIServerFloatingIP, APIServerPort'
15541560
type: boolean
15551561
managedSecurityGroups:
1556-
description: 'ManagedSecurityGroups defines that kubernetes manages
1557-
the OpenStack security groups for now, that means that we''ll create
1558-
security group allows traffic to/from machines belonging to that
1559-
group based on Calico CNI plugin default network requirements: BGP
1560-
and IP-in-IP for master node(s) and worker node(s) respectively.
1561-
In the future, we could make this more flexible.'
1562+
description: ManagedSecurityGroups determines whether OpenStack security
1563+
groups for the cluster will be managed by the OpenStack provider
1564+
or whether pre-existing security groups will be specified as part
1565+
of the configuration. By default, the managed security groups have
1566+
rules that allow the Kubelet, etcd, the Kubernetes API server and
1567+
the Calico CNI plugin to function correctly.
15621568
type: boolean
15631569
network:
15641570
description: If NodeCIDR cannot be set this can be used to detect

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ spec:
5050
description: OpenStackClusterSpec defines the desired state of
5151
OpenStackCluster.
5252
properties:
53+
allowAllInClusterTraffic:
54+
description: AllowAllInClusterTraffic is only used when managed
55+
security groups are in use. If set to true, the rules for
56+
the managed security groups are configured so that all ingress
57+
and egress between cluster nodes is permitted, allowing
58+
CNIs other than Calico to be used.
59+
type: boolean
5360
apiServerFloatingIP:
5461
description: APIServerFloatingIP is the floatingIP which will
5562
be associated to the APIServer. The floatingIP will be created
@@ -544,13 +551,13 @@ spec:
544551
APIServerPort'
545552
type: boolean
546553
managedSecurityGroups:
547-
description: 'ManagedSecurityGroups defines that kubernetes
548-
manages the OpenStack security groups for now, that means
549-
that we''ll create security group allows traffic to/from
550-
machines belonging to that group based on Calico CNI plugin
551-
default network requirements: BGP and IP-in-IP for master
552-
node(s) and worker node(s) respectively. In the future,
553-
we could make this more flexible.'
554+
description: ManagedSecurityGroups determines whether OpenStack
555+
security groups for the cluster will be managed by the OpenStack
556+
provider or whether pre-existing security groups will be
557+
specified as part of the configuration. By default, the
558+
managed security groups have rules that allow the Kubelet,
559+
etcd, the Kubernetes API server and the Calico CNI plugin
560+
to function correctly.
554561
type: boolean
555562
network:
556563
description: If NodeCIDR cannot be set this can be used to

0 commit comments

Comments
 (0)