@@ -32,26 +32,82 @@ 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.
41
+ // when the field is omitted, A DHCP service will be created in the service instance and its private network will be used.
43
42
Network IBMPowerVSResourceReference `json:"network"`
44
43
45
44
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
46
45
// +optional
47
46
ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
47
+
48
+ // serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created.
49
+ // Power VS service is a container for all Power VS instances at a specific geographic region.
50
+ // serviceInstance can be created via IBM Cloud catalog or CLI.
51
+ // supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.
52
+ // More detail about Power VS service instance.
53
+ // https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server
54
+ // when omitted system will dynamically create the service instance
55
+ // +optional
56
+ ServiceInstance * IBMPowerVSResourceReference `json:"serviceInstance,omitempty"`
57
+
58
+ // zone is the name of Power VS zone where the cluster will be created
59
+ // possible values can be found here https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server.
60
+ // when value for serviceInstance is omitted its required to set the value for zone.
61
+ // +optional
62
+ Zone * string `json:"zone,omitempty"`
63
+
64
+ // resourceGroup name under which the resources will be created.
65
+ // when omitted Default resource group will be used.
66
+ // +optional
67
+ ResourceGroup * string `json:"resourceGroup,omitempty"`
68
+
69
+ // vpc contains information about IBM Cloud VPC resources
70
+ // +optional
71
+ VPC * VPCResourceReference `json:"vpc,omitempty"`
72
+
73
+ // transitGateway contains information about IBM Cloud TransitGateway.
74
+ // +optional
75
+ TransitGateway * TransitGateway `json:"transitGateway,omitempty"`
76
+
77
+ // controlPlaneLoadBalancer is optional configuration for customizing control plane behavior.
78
+ // Its name reference to IBM Cloud VPC LoadBalancer service.
79
+ // +optional
80
+ ControlPlaneLoadBalancer * VPCLoadBalancerSpec `json:"controlPlaneLoadBalancer,omitempty"`
48
81
}
49
82
50
83
// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
51
84
type IBMPowerVSClusterStatus struct {
52
- // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
53
- // Important: Run "make" to regenerate code after modifying this file
85
+ // ready is true when the provider resource is ready.
54
86
Ready bool `json:"ready"`
87
+
88
+ // serviceInstanceID is the reference to the Power VS service on which the server instance(VM) will be created.
89
+ ServiceInstanceID * string `json:"serviceInstanceID,omitempty"`
90
+
91
+ // networkID is the reference to the Power VS network to use for this cluster.
92
+ NetworkID * string `json:"networkID,omitempty"`
93
+
94
+ // dhcpServerID is the reference to the Power VS DHCP server.
95
+ DHCPServerID * string `json:"dhcpServerID,omitempty"`
96
+
97
+ // vpcID is reference to IBM Cloud VPC resources.
98
+ VPCID * string `json:"vpcID,omitempty"`
99
+
100
+ // vpcSubnetID is reference to IBM Cloud VPC subnet.
101
+ VPCSubnetID * string `json:"vpcSubnetID,omitempty"`
102
+
103
+ // transitGatewayID is reference to IBM Cloud TransitGateway.
104
+ TransitGatewayID * string `json:"transitGatewayID,omitempty"`
105
+
106
+ // ControlPlaneLoadBalancer reference to IBM Cloud VPC Loadbalancer.
107
+ ControlPlaneLoadBalancer * VPCLoadBalancerStatus `json:"controlPlaneLoadBalancer,omitempty"`
108
+
109
+ // Conditions defines current service state of the IBMPowerVSCluster.
110
+ Conditions capiv1beta1.Conditions `json:"conditions,omitempty"`
55
111
}
56
112
57
113
// +kubebuilder:object:root=true
@@ -81,6 +137,30 @@ type IBMPowerVSClusterList struct {
81
137
Items []IBMPowerVSCluster `json:"items"`
82
138
}
83
139
140
+ // TransitGateway holds the TransitGateway information.
141
+ type TransitGateway struct {
142
+ Name * string `json:"name,omitempty"`
143
+ ID * string `json:"id,omitempty"`
144
+ }
145
+
146
+ // VPCResourceReference is a reference to a specific VPC resource by ID or Name
147
+ // Only one of ID or Name may be specified. Specifying more than one will result in
148
+ // a validation error.
149
+ type VPCResourceReference struct {
150
+ // ID of resource
151
+ // +kubebuilder:validation:MinLength=1
152
+ // +optional
153
+ ID * string `json:"id,omitempty"`
154
+
155
+ // Name of resource
156
+ // +kubebuilder:validation:MinLength=1
157
+ // +optional
158
+ Name * string `json:"name,omitempty"`
159
+
160
+ // IBM Cloud VPC zone
161
+ Zone * string `json:"zone,omitempty"`
162
+ }
163
+
84
164
func init () {
85
165
SchemeBuilder .Register (& IBMPowerVSCluster {}, & IBMPowerVSClusterList {})
86
166
}
0 commit comments