Skip to content

Commit 9d5df15

Browse files
committed
Add proposal for Power VS infra creation
1 parent 7f4aef3 commit 9d5df15

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

docs/images/powervs-cluster.png

24.6 KB
Loading

docs/images/powervs-workflow.png

90.3 KB
Loading
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Dynamically create infrastructure required for Power VS cluster
2+
3+
## Motivation
4+
Currently, inorder to create Power VS cluster using cluster api we need to create few resources in hand which includes
5+
1. Creating a Power VS workspace
6+
2. Creating a Power VS Network
7+
3. Creating a port on network
8+
9+
as this involves some prerequisite work which is limiting true capabilities of cluster api.
10+
Along the similar line today the cluster is accessible to end user via external ip and which is loadbalanced on controlplanes using kube-vip.
11+
12+
## Goal
13+
1. Dynamically creating required cloud resources as a part of cluster creation.
14+
2. Allowing users to access the cluster via loadbalacer.
15+
16+
## Proposal
17+
18+
### Cluster API Power VS cluster components
19+
20+
![img_2.png](../images/powervs-cluster.png)
21+
22+
Power VS workpsace is connected to IBM Cloud VPC with the help of IBM Cloud TransitGateway.
23+
24+
### Proposed API changes
25+
26+
```shell
27+
// IBMPowerVSClusterSpec defines the desired state of IBMPowerVSCluster.
28+
type IBMPowerVSClusterSpec struct {
29+
// ServiceInstanceID is the id of the power cloud instance where the vsi instance will get deployed.
30+
// +kubebuilder:validation:MinLength=1
31+
// Deprecated: use ServiceInstance instead
32+
ServiceInstanceID string `json:"serviceInstanceID"`
33+
34+
// Network is the reference to the Network to use for this cluster.
35+
// Whenf the field is omitted, A DHCP service will be created in the service instance and its private network will be used.
36+
Network IBMPowerVSResourceReference `json:"network"`
37+
38+
// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
39+
// +optional
40+
ControlPlaneEndpoint capiv1beta1.APIEndpoint `json:"controlPlaneEndpoint"`
41+
42+
// serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created.
43+
// Power VS service is a container for all Power VS instances at a specific geographic region.
44+
// serviceInstance can be created via IBM Cloud catalog or CLI.
45+
// supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.
46+
// More detail about Power VS service instance.
47+
// https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server
48+
// when omitted system will dynamically create the service instance
49+
// +optional
50+
ServiceInstance IBMPowerVSResourceReference `json:"serviceInstance"`
51+
52+
// zone is the name of Power VS zone where the cluster will be created
53+
Zone string `json:"zone"`
54+
55+
// resourceGroup name under which the resources will be created.
56+
ResourceGroup string `json:"resourceGroup"`
57+
58+
// vpc contains information about IBM Cloud VPC resources
59+
// +optional
60+
VPC IBMVPCResourceReference `json:"vpc,omitempty"`
61+
62+
// transitGateway contains information about IBM Cloud TransitGateway.
63+
// +optional
64+
TransitGateway IBMTransitGatewayResource `json:"transitGateway,omitempty"`
65+
66+
// controlPlaneLoadBalancer is optional configuration for customizing control plane behavior.
67+
// +optional
68+
ControlPlaneLoadBalancer *VPCLoadBalancerSpec `json:"controlPlaneLoadBalancer,omitempty"`
69+
}
70+
71+
// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
72+
type IBMPowerVSClusterStatus struct {
73+
// ready is true when the provider resource is ready.
74+
Ready bool `json:"ready"`
75+
76+
// serviceInstanceID is the reference to the Power VS service on which the server instance(VM) will be created.
77+
ServiceInstanceID *string `json:"serviceInstanceID,omitempty"`
78+
79+
// networkID is the reference to the Power VS network to use for this cluster.
80+
NetworkID *string `json:"networkID,omitempty"`
81+
82+
// dhcpServerID is the reference to the Power VS DHCP server.
83+
DHCPServerID *string `json:"dhcpServerID,omitempty"`
84+
85+
// vpcID is reference to IBM Cloud VPC resources.
86+
VPCID *string `json:"vpcID,omitempty"`
87+
88+
// vpcSubnetID is reference to IBM Cloud VPC subnet.
89+
VPCSubnetID *string `json:"vpcSubnetID,omitempty"`
90+
91+
// transitGatewayID is reference to IBM Cloud TransitGateway.
92+
TransitGatewayID *string `json:"transitGatewayID,omitempty"`
93+
94+
// ControlPlaneLoadBalancer reference to IBM Cloud VPC Loadbalancer.
95+
ControlPlaneLoadBalancer *VPCLoadBalancerStatus `json:"controlPlaneLoadBalancer,omitempty"`
96+
97+
// Conditions defines current service state of the IBMPowerVSCluster.
98+
Conditions capiv1beta1.Conditions `json:"conditions,omitempty"`
99+
}
100+
101+
// IBMTransitGatewayResource holds the TransitGateway information.
102+
type IBMTransitGatewayResource struct {
103+
Name *string `json:"name,omitempty"`
104+
ID *string `json:"id,omitempty"`
105+
}
106+
```
107+
### Following resources will be created
108+
1. Power VS workspace
109+
2. Power VS Network [DHCP service]
110+
3. VPC :
111+
4. VPC Subnet
112+
5. Transit gateway
113+
6. Loadbalancer
114+
115+
### Cluster creation workflow
116+
117+
![img_4.png](../images/powervs-workflow.png)
118+

0 commit comments

Comments
 (0)