@@ -31,11 +31,18 @@ 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 Power VS 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 workspace and its private network will be used.
35
+ // the DHCP service created network will have the following name format
36
+ // 1. in the case of DHCPServer.Name is not set the name will be DHCPSERVER< CLUSTER_NAME> _Private.
37
+ // 2. if DHCPServer.Name is set the name will be DHCPSERVER< DHCPServer.Name> _Private.
38
+ // when Network.ID is set, its expected that there exist a network in PowerVS workspace with id or else system will give error.
39
+ // when Network.Name is set, system will first check for network with Name in PowerVS workspace, if not exist network will be created by DHCP service.
40
+ // Network.RegEx is not yet supported and system will ignore the value.
35
41
Network IBMPowerVSResourceReference ` json:" network" `
36
42
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.
43
+ // dhcpServer is contains the configuration to be used while creating a new DHCP server in PowerVS workspace.
44
+ // when the field is omitted, CLUSTER_NAME will be used as DHCPServer.Name and DHCP server will be created.
45
+ // it will automatically create network with name DHCPSERVER< DHCPServer.Name> _Private in PowerVS workspace.
39
46
// +optional
40
47
DHCPServer * DHCPServer ` json:" dhcpServer,omitempty" `
41
48
@@ -49,46 +56,88 @@ type IBMPowerVSClusterSpec struct {
49
56
// supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.
50
57
// More detail about Power VS service instance.
51
58
// https://cloud.ibm.com/docs/power-iaas? topic=power-iaas-creating-power-virtual-server
52
- // when omitted system will dynamically create the service instance
59
+ // when omitted system will dynamically create the service instance with name CLUSTER_NAME-serviceInstance.
60
+ // when ServiceInstance.ID is set, its expected that there exist a service instance in PowerVS workspace with id or else system will give error.
61
+ // when ServiceInstance.Name is set, system will first check for service instance with Name in PowerVS workspace, if not exist system will create new instance.
62
+ // ServiceInstance.Regex is not yet supported not yet supported and system will ignore the value.
53
63
// +optional
54
64
ServiceInstance * IBMPowerVSResourceReference ` json:" serviceInstance,omitempty" `
55
65
56
66
// zone is the name of Power VS zone where the cluster will be created
57
67
// possible values can be found here https://cloud.ibm.com/docs/power-iaas? topic=power-iaas-creating-power-virtual-server.
68
+ // when powervs.cluster.x-k8s.io/create-infra=true annotation is set on IBMPowerVSCluster resource,
69
+ // 1. it is expected to set the zone, not setting will result in webhook error.
70
+ // 2. the zone should have PER capabilities, or else system will give error.
58
71
// +optional
59
72
Zone * string ` json:" zone,omitempty" `
60
73
61
74
// resourceGroup name under which the resources will be created.
62
- // when omitted default resource group of the account will be used.
75
+ // when powervs.cluster.x-k8s.io/create-infra=true annotation is set on IBMPowerVSCluster resource,
76
+ // 1. it is expected to set the ResourceGroup.Name, not setting will result in webhook error.
77
+ // ServiceInstance.ID and ServiceInstance.Regex is not yet supported and system will ignore the value.
63
78
// +optional
64
79
ResourceGroup * IBMPowerVSResourceReference ` json:" resourceGroup,omitempty" `
65
80
66
81
// vpc contains information about IBM Cloud VPC resources.
82
+ // when omitted system will dynamically create the VPC with name CLUSTER_NAME-vpc.
83
+ // when VPC.ID is set, its expected that there exist a VPC with ID or else system will give error.
84
+ // when VPC.Name is set, system will first check for VPC with Name, if not exist system will create new VPC.
85
+ // when powervs.cluster.x-k8s.io/create-infra=true annotation is set on IBMPowerVSCluster resource,
86
+ // 1. it is expected to set the VPC.Region, not setting will result in webhook error.
67
87
// +optional
68
88
VPC * VPCResourceReference ` json:" vpc,omitempty" `
69
89
70
90
// vpcSubnets contains information about IBM Cloud VPC Subnet resources.
91
+ // when omitted system will create the subnets in all the zone corresponding to VPC.Region, with name CLUSTER_NAME-vpcsubnet-ZONE_NAME.
92
+ // possible values can be found here https://cloud.ibm.com/docs/power-iaas? topic=power-iaas-creating-power-virtual-server.
93
+ // when VPCSubnets[].ID is set, its expected that there exist a subnet with ID or else system will give error.
94
+ // when VPCSubnets[].Zone is not set, a random zone is picked from available zones of VPC.Region.
95
+ // when VPCSubnets[].Name is not set, system will set name as CLUSTER_NAME-vpcsubnet-INDEX.
96
+ // if subnet with name VPCSubnets[].Name not found, system will create new subnet in VPCSubnets[].Zone.
71
97
// +optional
72
98
VPCSubnets []Subnet ` json:" vpcSubnets,omitempty" `
73
99
74
100
// transitGateway contains information about IBM Cloud TransitGateway
75
101
// IBM Cloud TransitGateway helps in establishing network connectivity between IBM Cloud Power VS and VPC infrastructure
76
102
// more information about TransitGateway can be found here https://www.ibm.com/products/transit-gateway.
103
+ // when TransitGateway.ID is set, its expected that there exist a TransitGateway with ID or else system will give error.
104
+ // when TransitGateway.Name is set, system will first check for TransitGateway with Name, if not exist system will create new TransitGateway.
77
105
// +optional
78
106
TransitGateway * TransitGateway ` json:" transitGateway,omitempty" `
79
107
80
- // loadBalancers is optional configuration for configuring loadbalancers to control plane or data plane nodes
108
+ // loadBalancers is optional configuration for configuring loadbalancers to control plane or data plane nodes.
109
+ // when omitted system will create a public loadbalancer with name CLUSTER_NAME-loadbalancer.
81
110
// when specified a vpc loadbalancer will be created and controlPlaneEndpoint will be set with associated hostname of loadbalancer.
82
- // when omitted user is expected to set controlPlaneEndpoint.
111
+ // ControlPlaneEndpoint will be set with associated hostname of public loadbalancer.
112
+ // when LoadBalancers[].ID is set, its expected that there exist a loadbalancer with ID or else system will give error.
113
+ // when LoadBalancers[].Name is set, system will first check for loadbalancer with Name, if not exist system will create new loadbalancer.
83
114
// +optional
84
115
LoadBalancers []VPCLoadBalancerSpec ` json:" loadBalancers,omitempty" `
85
116
86
117
// cosInstance contains options to configure a supporting IBM Cloud COS bucket for this
87
118
// cluster - currently used for nodes requiring Ignition
88
119
// (https://coreos.github.io/ignition/) for bootstrapping (requires
89
120
// BootstrapFormatIgnition feature flag to be enabled).
121
+ // when powervs.cluster.x-k8s.io/create-infra=true annotation is set on IBMPowerVSCluster resource and Ignition is set, then
122
+ // 1. CosInstance.Name should be set not setting will result in webhook error.
123
+ // 2. CosInstance.BucketName should be set not setting will result in webhook error.
124
+ // 3. CosInstance.BucketRegion should be set not setting will result in webhook error.
90
125
// +optional
91
126
CosInstance * CosInstance ` json:" cosInstance,omitempty" `
127
+
128
+ // Ignition defined options related to the bootstrapping systems where Ignition is used.
129
+ // +optional
130
+ Ignition * Ignition ` json:" ignition,omitempty" `
131
+ }
132
+
133
+ // Ignition defines options related to the bootstrapping systems where Ignition is used.
134
+ type Ignition struct {
135
+ // Version defines which version of Ignition will be used to generate bootstrap data.
136
+ //
137
+ // +optional
138
+ // +kubebuilder:default=" 2.3"
139
+ // +kubebuilder:validation:Enum=" 2.3" ; " 2.4" ; " 3.0" ; " 3.1" ; " 3.2" ; " 3.3" ; " 3.4"
140
+ Version string ` json:" version,omitempty" `
92
141
}
93
142
94
143
// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
0 commit comments