Skip to content

Commit

Permalink
Attach connections to existing transit gateway when its not there (#1901
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dharaneeshvrd authored Sep 12, 2024
1 parent 5934f9d commit 632a722
Show file tree
Hide file tree
Showing 5 changed files with 336 additions and 113 deletions.
15 changes: 14 additions & 1 deletion api/v1beta2/ibmpowervscluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,19 @@ type ResourceReference struct {
ControllerCreated *bool `json:"controllerCreated,omitempty"`
}

// TransitGatewayStatus defines the status of transit gateway as well as it's connection's status.
type TransitGatewayStatus struct {
// id represents the id of the resource.
ID *string `json:"id,omitempty"`
// +kubebuilder:default=false
// controllerCreated indicates whether the resource is created by the controller.
ControllerCreated *bool `json:"controllerCreated,omitempty"`
// vpcConnection defines the vpc connection status in transit gateway.
VPCConnection *ResourceReference `json:"vpcConnection,omitempty"`
// powerVSConnection defines the powervs connection status in transit gateway.
PowerVSConnection *ResourceReference `json:"powerVSConnection,omitempty"`
}

// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
type IBMPowerVSClusterStatus struct {
// ready is true when the provider resource is ready.
Expand Down Expand Up @@ -209,7 +222,7 @@ type IBMPowerVSClusterStatus struct {
VPCSecurityGroups map[string]VPCSecurityGroupStatus `json:"vpcSecurityGroups,omitempty"`

// transitGateway is reference to IBM Cloud TransitGateway.
TransitGateway *ResourceReference `json:"transitGateway,omitempty"`
TransitGateway *TransitGatewayStatus `json:"transitGateway,omitempty"`

// cosInstance is reference to IBM Cloud COS Instance resource.
COSInstance *ResourceReference `json:"cosInstance,omitempty"`
Expand Down
37 changes: 36 additions & 1 deletion api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 632a722

Please sign in to comment.