Skip to content

Commit efc2b5f

Browse files
committed
Support VPC security group for PowerVS clusters
1 parent fbbd4e6 commit efc2b5f

12 files changed

+1397
-1
lines changed

api/v1beta1/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/conditions_consts.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ const (
8585
// NetworkReconciliationFailedReason used when an error occurs during network reconciliation.
8686
NetworkReconciliationFailedReason = "NetworkReconciliationFailed"
8787

88+
// VPCSecurityGroupReadyCondition reports on the successful reconciliation of a VPC.
89+
VPCSecurityGroupReadyCondition capiv1beta1.ConditionType = "VPCSecurityGroupReady"
90+
// VPCSecurityGroupReconciliationFailedReason used when an error occurs during VPC reconciliation.
91+
VPCSecurityGroupReconciliationFailedReason = "VPCSecurityGroupReconciliationFailed"
92+
8893
// VPCReadyCondition reports on the successful reconciliation of a VPC.
8994
VPCReadyCondition capiv1beta1.ConditionType = "VPCReady"
9095
// VPCReconciliationFailedReason used when an error occurs during VPC reconciliation.

api/v1beta2/ibmpowervscluster_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ type IBMPowerVSClusterSpec struct {
103103
// +optional
104104
VPCSubnets []Subnet `json:"vpcSubnets,omitempty"`
105105

106+
// securityGroups to attach it to the VPC resource
107+
// +optional
108+
VPCSecurityGroups []SecurityGroup `json:"vpcSecurityGroups,omitempty"`
109+
106110
// transitGateway contains information about IBM Cloud TransitGateway
107111
// IBM Cloud TransitGateway helps in establishing network connectivity between IBM Cloud Power VS and VPC infrastructure
108112
// more information about TransitGateway can be found here https://www.ibm.com/products/transit-gateway.
@@ -200,6 +204,9 @@ type IBMPowerVSClusterStatus struct {
200204
// vpcSubnet is reference to IBM Cloud VPC subnet.
201205
VPCSubnet map[string]ResourceReference `json:"vpcSubnet,omitempty"`
202206

207+
// vpcSecurityGroups is reference to IBM Cloud VPC security group.
208+
VPCSecurityGroups map[string]VPCSecurityGroupStatus `json:"vpcSecurityGroups,omitempty"`
209+
203210
// transitGateway is reference to IBM Cloud TransitGateway.
204211
TransitGateway *ResourceReference `json:"transitGateway,omitempty"`
205212

api/v1beta2/ibmvpccluster_types.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ type AdditionalListenerSpec struct {
9393
Port int64 `json:"port"`
9494
}
9595

96+
// VPCSecurityGroupStatus defines a vpc security group resource status with its id and respective rule's ids.
97+
type VPCSecurityGroupStatus struct {
98+
// id represents the id of the resource.
99+
ID *string `json:"id,omitempty"`
100+
// rules contains the id of rules created under the security group
101+
RuleIDs []*string `json:"rules,omitempty"`
102+
// +kubebuilder:default=false
103+
// controllerCreated indicates whether the resource is created by the controller.
104+
ControllerCreated *bool `json:"controllerCreated,omitempty"`
105+
}
106+
96107
// VPCLoadBalancerStatus defines the status VPC load balancer.
97108
type VPCLoadBalancerStatus struct {
98109
// id of VPC load balancer.

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)