@@ -31,34 +31,37 @@ type IBMPowerVSClusterSpec struct {
31
31
ServiceInstanceID string ` json:" serviceInstanceID" `
32
32
33
33
// Network is the reference to the Network to use for this cluster.
34
- // when the field is omitted, A DHCP service will be created in the PowerVS server workspace and its private network will be used.
34
+ // when the field is omitted, A DHCP service will be created in the Power VS server workspace and its private network will be used.
35
35
Network IBMPowerVSResourceReference ` json:" network" `
36
36
37
+ // DHCPServer is contains the configuration to be used while creating a new DHCP server in PowerVS workspace.
38
+ // when the field is omitted, a default name is constructed and DHCP server will be created.
39
+ // +optional
40
+ DHCPServer * DHCPServer ` json:" dhcpServer,omitempty" `
41
+
37
42
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
38
43
// +optional
39
44
ControlPlaneEndpoint capiv1beta1.APIEndpoint ` json:" controlPlaneEndpoint" `
40
45
41
- // serviceInstance is the reference to the PowerVS server workspace on which the server instance(VM) will be created.
42
- // PowerVS server workspace is a container for all PowerVS instances at a specific geographic region.
46
+ // serviceInstance is the reference to the Power VS server workspace on which the server instance(VM) will be created.
47
+ // Power VS server workspace is a container for all Power VS instances at a specific geographic region.
43
48
// serviceInstance can be created via IBM Cloud catalog or CLI.
44
49
// supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.
45
- // More detail about PowerVS service instance.
50
+ // More detail about Power VS service instance.
46
51
// https://cloud.ibm.com/docs/power-iaas? topic=power-iaas-creating-power-virtual-server
47
52
// when omitted system will dynamically create the service instance
48
53
// +optional
49
54
ServiceInstance * IBMPowerVSResourceReference ` json:" serviceInstance,omitempty" `
50
55
51
- // zone is the name of PowerVS zone where the cluster will be created
56
+ // zone is the name of Power VS zone where the cluster will be created
52
57
// possible values can be found here https://cloud.ibm.com/docs/power-iaas? topic=power-iaas-creating-power-virtual-server.
53
- // when omitted dal10 will be set as default zone.
54
- // +kubebuilder:default=dal10
55
58
// +optional
56
59
Zone * string ` json:" zone,omitempty" `
57
60
58
61
// resourceGroup name under which the resources will be created.
59
62
// when omitted default resource group of the account will be used.
60
63
// +optional
61
- ResourceGroup * string ` json:" resourceGroup,omitempty" `
64
+ ResourceGroup * IBMPowerVSResourceReference ` json:" resourceGroup,omitempty" `
62
65
63
66
// vpc contains information about IBM Cloud VPC resources.
64
67
// +optional
@@ -69,7 +72,7 @@ type IBMPowerVSClusterSpec struct {
69
72
VPCSubnets []Subnet ` json:" vpcSubnets,omitempty" `
70
73
71
74
// transitGateway contains information about IBM Cloud TransitGateway
72
- // IBM Cloud TransitGateway helps in establishing network connectivity between IBM Cloud PowerVS and VPC infrastructure
75
+ // IBM Cloud TransitGateway helps in establishing network connectivity between IBM Cloud Power VS and VPC infrastructure
73
76
// more information about TransitGateway can be found here https://www.ibm.com/products/transit-gateway.
74
77
// +optional
75
78
TransitGateway * TransitGateway ` json:" transitGateway,omitempty" `
@@ -94,13 +97,16 @@ type IBMPowerVSClusterStatus struct {
94
97
// +kubebuilder:default=false
95
98
Ready bool ` json:" ready" `
96
99
97
- // serviceInstance is the reference to the PowerVS service on which the server instance(VM) will be created.
100
+ // ResourceGroup is the reference to the Power VS resource group under which the resources will be created.
101
+ ResourceGroup * ResourceReference ` json:" resourceGroupID,omitempty" `
102
+
103
+ // serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created.
98
104
ServiceInstance * ResourceReference ` json:" serviceInstance,omitempty" `
99
105
100
- // networkID is the reference to the PowerVS network to use for this cluster.
106
+ // networkID is the reference to the Power VS network to use for this cluster.
101
107
Network * ResourceReference ` json:" network,omitempty" `
102
108
103
- // dhcpServer is the reference to the PowerVS DHCP server.
109
+ // dhcpServer is the reference to the Power VS DHCP server.
104
110
DHCPServer * ResourceReference ` json:" dhcpServer,omitempty" `
105
111
106
112
// vpc is reference to IBM Cloud VPC resources.
@@ -122,6 +128,26 @@ type IBMPowerVSClusterStatus struct {
122
128
Conditions capiv1beta1.Conditions ` json:" conditions,omitempty" `
123
129
}
124
130
131
+ // DHCPServer contains the DHCP server configurations.
132
+ type DHCPServer struct {
133
+ // Optional cidr for DHCP private network
134
+ Cidr * string ` json:" cidr,omitempty" `
135
+
136
+ // Optional DNS Server for DHCP service
137
+ // +kubebuilder:default=" 1.1.1.1"
138
+ DNSServer * string ` json:" dnsServer,omitempty" `
139
+
140
+ // Optional name of DHCP Service. Only alphanumeric characters and dashes are allowed (will be prefixed by DHCP identifier)
141
+ Name * string ` json:" name,omitempty" `
142
+
143
+ // Optional id of the existing DHCPServer
144
+ ID * string ` json:" id,omitempty" `
145
+
146
+ // Optional indicates if SNAT will be enabled for DHCP service
147
+ // +kubebuilder:default=true
148
+ Snat * bool ` json:" snat,omitempty" `
149
+ }
150
+
125
151
// ResourceReference identifies a resource with id.
126
152
type ResourceReference struct {
127
153
// id represents the id of the resource.
@@ -131,8 +157,7 @@ type ResourceReference struct {
131
157
ControllerCreated * bool ` json:" controllerCreated,omitempty" `
132
158
}
133
159
134
-
135
- /// TransitGateway holds the TransitGateway information.
160
+ // TransitGateway holds the TransitGateway information.
136
161
type TransitGateway struct {
137
162
Name * string ` json:" name,omitempty" `
138
163
ID * string ` json:" id,omitempty" `
@@ -158,15 +183,6 @@ type VPCResourceReference struct {
158
183
159
184
// CosInstance represents IBM Cloud COS instance.
160
185
type CosInstance struct {
161
- // PresignedURLDuration defines the duration for which presigned URLs are valid.
162
- //
163
- // This is used to generate presigned URLs for S3 Bucket objects, which are used by
164
- // control-plane and worker nodes to fetch bootstrap data.
165
- //
166
- // When enabled, the IAM instance profiles specified are not used.
167
- // +optional
168
- PresignedURLDuration * metav1.Duration ` json:" presignedURLDuration,omitempty" `
169
-
170
186
// Name defines name of IBM cloud COS instance to be created.
171
187
// +kubebuilder:validation:MinLength:=3
172
188
// +kubebuilder:validation:MaxLength:=63
@@ -197,6 +213,9 @@ User can specify the existing resources in spec, When specified controller will
197
213
198
214
When the resource is not set or provided resource with name does not exist in cloud, the controller will create the resource in cloud.
199
215
216
+ ! [powervs-cluster-create-workflow.png](../images/powervs-cluster-create-workflow.png)
217
+
200
218
# ## Cluster Deletion workflow
201
219
The controller will only delete the resources which are created by it.
220
+
202
221
! [powervs-cluster-delete-workflow.png](../images/powervs-cluster-delete-workflow.png)
0 commit comments