Skip to content

Commit 469a6ba

Browse files
authored
Update api specs as per new changes (#1627)
1 parent 0f5bb7e commit 469a6ba

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

docs/proposal/20231109-powervs-infra-creation.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,37 @@ type IBMPowerVSClusterSpec struct {
3131
ServiceInstanceID string `json:"serviceInstanceID"`
3232

3333
// 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.
3535
Network IBMPowerVSResourceReference `json:"network"`
3636

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+
3742
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
3843
// +optional
3944
ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
4045

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.
4348
// serviceInstance can be created via IBM Cloud catalog or CLI.
4449
// 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.
4651
// https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server
4752
// when omitted system will dynamically create the service instance
4853
// +optional
4954
ServiceInstance *IBMPowerVSResourceReference `json:"serviceInstance,omitempty"`
5055

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
5257
// 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
5558
// +optional
5659
Zone *string `json:"zone,omitempty"`
5760

5861
// resourceGroup name under which the resources will be created.
5962
// when omitted default resource group of the account will be used.
6063
// +optional
61-
ResourceGroup *string `json:"resourceGroup,omitempty"`
64+
ResourceGroup *IBMPowerVSResourceReference `json:"resourceGroup,omitempty"`
6265

6366
// vpc contains information about IBM Cloud VPC resources.
6467
// +optional
@@ -69,7 +72,7 @@ type IBMPowerVSClusterSpec struct {
6972
VPCSubnets []Subnet `json:"vpcSubnets,omitempty"`
7073

7174
// 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
7376
// more information about TransitGateway can be found here https://www.ibm.com/products/transit-gateway.
7477
// +optional
7578
TransitGateway *TransitGateway `json:"transitGateway,omitempty"`
@@ -94,13 +97,16 @@ type IBMPowerVSClusterStatus struct {
9497
// +kubebuilder:default=false
9598
Ready bool `json:"ready"`
9699

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.
98104
ServiceInstance *ResourceReference `json:"serviceInstance,omitempty"`
99105

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.
101107
Network *ResourceReference `json:"network,omitempty"`
102108

103-
// dhcpServer is the reference to the PowerVS DHCP server.
109+
// dhcpServer is the reference to the Power VS DHCP server.
104110
DHCPServer *ResourceReference `json:"dhcpServer,omitempty"`
105111

106112
// vpc is reference to IBM Cloud VPC resources.
@@ -122,6 +128,26 @@ type IBMPowerVSClusterStatus struct {
122128
Conditions capiv1beta1.Conditions `json:"conditions,omitempty"`
123129
}
124130

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+
125151
// ResourceReference identifies a resource with id.
126152
type ResourceReference struct {
127153
// id represents the id of the resource.
@@ -131,8 +157,7 @@ type ResourceReference struct {
131157
ControllerCreated *bool `json:"controllerCreated,omitempty"`
132158
}
133159

134-
135-
/// TransitGateway holds the TransitGateway information.
160+
// TransitGateway holds the TransitGateway information.
136161
type TransitGateway struct {
137162
Name *string `json:"name,omitempty"`
138163
ID *string `json:"id,omitempty"`
@@ -158,15 +183,6 @@ type VPCResourceReference struct {
158183

159184
// CosInstance represents IBM Cloud COS instance.
160185
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-
170186
// Name defines name of IBM cloud COS instance to be created.
171187
// +kubebuilder:validation:MinLength:=3
172188
// +kubebuilder:validation:MaxLength:=63
@@ -197,6 +213,9 @@ User can specify the existing resources in spec, When specified controller will
197213
198214
When the resource is not set or provided resource with name does not exist in cloud, the controller will create the resource in cloud.
199215
216+
![powervs-cluster-create-workflow.png](../images/powervs-cluster-create-workflow.png)
217+
200218
### Cluster Deletion workflow
201219
The controller will only delete the resources which are created by it.
220+
202221
![powervs-cluster-delete-workflow.png](../images/powervs-cluster-delete-workflow.png)

0 commit comments

Comments
 (0)