@@ -31,11 +31,18 @@ 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 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.
3541 Network IBMPowerVSResourceReference ` json:" network" `
3642
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.
3946 // +optional
4047 DHCPServer * DHCPServer ` json:" dhcpServer,omitempty" `
4148
@@ -49,46 +56,88 @@ type IBMPowerVSClusterSpec struct {
4956 // supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.
5057 // More detail about Power VS service instance.
5158 // 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.
5363 // +optional
5464 ServiceInstance * IBMPowerVSResourceReference ` json:" serviceInstance,omitempty" `
5565
5666 // zone is the name of Power VS zone where the cluster will be created
5767 // 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.
5871 // +optional
5972 Zone * string ` json:" zone,omitempty" `
6073
6174 // 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.
6378 // +optional
6479 ResourceGroup * IBMPowerVSResourceReference ` json:" resourceGroup,omitempty" `
6580
6681 // 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.
6787 // +optional
6888 VPC * VPCResourceReference ` json:" vpc,omitempty" `
6989
7090 // 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.
7197 // +optional
7298 VPCSubnets []Subnet ` json:" vpcSubnets,omitempty" `
7399
74100 // transitGateway contains information about IBM Cloud TransitGateway
75101 // IBM Cloud TransitGateway helps in establishing network connectivity between IBM Cloud Power VS and VPC infrastructure
76102 // 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.
77105 // +optional
78106 TransitGateway * TransitGateway ` json:" transitGateway,omitempty" `
79107
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.
81110 // 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.
83114 // +optional
84115 LoadBalancers []VPCLoadBalancerSpec ` json:" loadBalancers,omitempty" `
85116
86117 // cosInstance contains options to configure a supporting IBM Cloud COS bucket for this
87118 // cluster - currently used for nodes requiring Ignition
88119 // (https://coreos.github.io/ignition/) for bootstrapping (requires
89120 // 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.
90125 // +optional
91126 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" `
92141}
93142
94143// IBMPowerVSClusterStatus defines the observed state of IBMPowerVSCluster.
0 commit comments