Skip to content

Commit 632a722

Browse files
Attach connections to existing transit gateway when its not there (#1901)
1 parent 5934f9d commit 632a722

File tree

5 files changed

+336
-113
lines changed

5 files changed

+336
-113
lines changed

api/v1beta2/ibmpowervscluster_types.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,19 @@ type ResourceReference struct {
181181
ControllerCreated *bool `json:"controllerCreated,omitempty"`
182182
}
183183

184+
// TransitGatewayStatus defines the status of transit gateway as well as it's connection's status.
185+
type TransitGatewayStatus struct {
186+
// id represents the id of the resource.
187+
ID *string `json:"id,omitempty"`
188+
// +kubebuilder:default=false
189+
// controllerCreated indicates whether the resource is created by the controller.
190+
ControllerCreated *bool `json:"controllerCreated,omitempty"`
191+
// vpcConnection defines the vpc connection status in transit gateway.
192+
VPCConnection *ResourceReference `json:"vpcConnection,omitempty"`
193+
// powerVSConnection defines the powervs connection status in transit gateway.
194+
PowerVSConnection *ResourceReference `json:"powerVSConnection,omitempty"`
195+
}
196+
184197
// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
185198
type IBMPowerVSClusterStatus struct {
186199
// ready is true when the provider resource is ready.
@@ -209,7 +222,7 @@ type IBMPowerVSClusterStatus struct {
209222
VPCSecurityGroups map[string]VPCSecurityGroupStatus `json:"vpcSecurityGroups,omitempty"`
210223

211224
// transitGateway is reference to IBM Cloud TransitGateway.
212-
TransitGateway *ResourceReference `json:"transitGateway,omitempty"`
225+
TransitGateway *TransitGatewayStatus `json:"transitGateway,omitempty"`
213226

214227
// cosInstance is reference to IBM Cloud COS Instance resource.
215228
COSInstance *ResourceReference `json:"cosInstance,omitempty"`

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 36 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)