@@ -32,11 +32,9 @@ const (
32
32
33
33
// IBMPowerVSClusterSpec defines the desired state of IBMPowerVSCluster.
34
34
type IBMPowerVSClusterSpec struct {
35
- // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
36
- // Important: Run "make" to regenerate code after modifying this file
37
-
38
35
// ServiceInstanceID is the id of the power cloud instance where the vsi instance will get deployed.
39
36
// +kubebuilder:validation:MinLength=1
37
+ // Deprecated: use ServiceInstance.ID instead
40
38
ServiceInstanceID string `json:"serviceInstanceID"`
41
39
42
40
// Network is the reference to the Network to use for this cluster.
@@ -45,13 +43,53 @@ type IBMPowerVSClusterSpec struct {
45
43
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
46
44
// +optional
47
45
ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
46
+
47
+ // serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created.
48
+ // Power VS service is a container for all Power VS instances at a specific geographic region.
49
+ // serviceInstance can be created via IBM Cloud catalog or CLI.
50
+ // supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.
51
+ // More detail about Power VS service instance.
52
+ // https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server
53
+ // when omitted system will dynamically create the service instance
54
+ // +optional
55
+ ServiceInstance IBMPowerVSResourceReference `json:"serviceInstance"`
56
+
57
+ // The Name of Power VS zone where the cluster will be created
58
+ Zone string `json:"zone"`
59
+
60
+ // ResourceGroup name under which the resources will be created.
61
+ ResourceGroup string `json:"resourceGroup"`
62
+
63
+ // VPC contains information about IBM Cloud VPC resources
64
+ // +optional
65
+ VPC VPCResource `json:"vpc"`
66
+
67
+ // ControlPlaneLoadBalancer is optional configuration for customizing control plane behavior.
68
+ // +optional
69
+ ControlPlaneLoadBalancer * VPCLoadBalancerSpec `json:"controlPlaneLoadBalancer,omitempty"`
48
70
}
49
71
50
72
// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
51
73
type IBMPowerVSClusterStatus struct {
52
- // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
53
- // Important: Run "make" to regenerate code after modifying this file
74
+ // Ready is true when the provider resource is ready.
54
75
Ready bool `json:"ready"`
76
+
77
+ // serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created.
78
+ ServiceInstance IBMPowerVSResourceReference `json:"serviceInstance,omitempty"`
79
+
80
+ // Network is the reference to the Network to use for this cluster.
81
+ Network IBMPowerVSResourceReference `json:"network,omitempty"`
82
+
83
+ // VPC holds the status of VPC resources
84
+ VPC VPCResource `json:"vpc,omitempty"`
85
+
86
+ // Conditions defines current service state of the IBMPowerVSCluster.
87
+ // +optional
88
+ Conditions capiv1beta1.Conditions `json:"conditions,omitempty"`
89
+
90
+ // ControlPlaneLoadBalancer is optional configuration for customizing control plane behavior.
91
+ // +optional
92
+ ControlPlaneLoadBalancer * VPCLoadBalancerStatus `json:"controlPlaneLoadBalancer,omitempty"`
55
93
}
56
94
57
95
// +kubebuilder:object:root=true
@@ -81,6 +119,27 @@ type IBMPowerVSClusterList struct {
81
119
Items []IBMPowerVSCluster `json:"items"`
82
120
}
83
121
122
+ // VPCResource holds the VPC information.
123
+ type VPCResource struct {
124
+ // Name of VPC
125
+ // +optional
126
+ Name string `json:"name"`
127
+
128
+ // IBM Cloud VPC zone where the cluster's loadbalancers will be created
129
+ Zone string `json:"vpcZone"`
130
+
131
+ // Subnet contains the details about subnet
132
+ Subnet Subnet `json:"subnet"`
133
+
134
+ // TransitGateway holds the resource details of TransitGateway
135
+ TransitGateway TransitGateway `json:"transitGateway"`
136
+ }
137
+
138
+ type TransitGateway struct {
139
+ Name * string `json:"name"`
140
+ ID * string `json:"id,omitempty"`
141
+ }
142
+
84
143
func init () {
85
144
SchemeBuilder .Register (& IBMPowerVSCluster {}, & IBMPowerVSClusterList {})
86
145
}
0 commit comments