@@ -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 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,61 @@ 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
+ // zone is 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
+ // transitGateway contains information about IBM Cloud TransitGateway.
68
+ // +optional
69
+ TransitGateway TransitGateway `json:"transitGateway"`
70
+
71
+ // controlPlaneLoadBalancer is optional configuration for customizing control plane behavior.
72
+ // +optional
73
+ ControlPlaneLoadBalancer * VPCLoadBalancerSpec `json:"controlPlaneLoadBalancer,omitempty"`
48
74
}
49
75
50
76
// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
51
77
type IBMPowerVSClusterStatus struct {
52
- // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
53
- // Important: Run "make" to regenerate code after modifying this file
78
+ // ready is true when the provider resource is ready.
54
79
Ready bool `json:"ready"`
80
+
81
+ // serviceInstanceID is the reference to the Power VS service on which the server instance(VM) will be created.
82
+ ServiceInstanceID * string `json:"serviceInstanceID,omitempty"`
83
+
84
+ // networkID is the reference to the Power VS network to use for this cluster.
85
+ NetworkID * string `json:"networkID,omitempty"`
86
+
87
+ // vpcID is reference to IBM Cloud VPC resources.
88
+ VpcID * string `json:"vpcID,omitempty"`
89
+
90
+ // vpcSubnetID is reference to IBM Cloud VPC subnet.
91
+ VPCSubnetID * string `json:"vpcSubnetID,omitempty"`
92
+
93
+ // transitGatewayID is reference to IBM Cloud TransitGateway.
94
+ TransitGatewayID * string `json:"transitGatewayID,omitempty"`
95
+
96
+ // ControlPlaneLoadBalancer reference to IBM Cloud VPC Loadbalancer.
97
+ ControlPlaneLoadBalancer * VPCLoadBalancerStatus `json:"controlPlaneLoadBalancer,omitempty"`
98
+
99
+ // Conditions defines current service state of the IBMPowerVSCluster.
100
+ Conditions capiv1beta1.Conditions `json:"conditions,omitempty"`
55
101
}
56
102
57
103
// +kubebuilder:object:root=true
@@ -81,6 +127,24 @@ type IBMPowerVSClusterList struct {
81
127
Items []IBMPowerVSCluster `json:"items"`
82
128
}
83
129
130
+ // VPCResource holds the VPC information.
131
+ type VPCResource struct {
132
+ // Name of VPC
133
+ // +optional
134
+ Name string `json:"name"`
135
+
136
+ // IBM Cloud VPC zone where the cluster's loadbalancers will be created
137
+ Zone string `json:"vpcZone"`
138
+
139
+ // Subnet contains the details about subnet
140
+ Subnet Subnet `json:"subnet"`
141
+ }
142
+
143
+ type TransitGateway struct {
144
+ Name * string `json:"name,omitempty"`
145
+ ID * string `json:"id,omitempty"`
146
+ }
147
+
84
148
func init () {
85
149
SchemeBuilder .Register (& IBMPowerVSCluster {}, & IBMPowerVSClusterList {})
86
150
}
0 commit comments