@@ -31,6 +31,7 @@ const (
3131// LinodeClusterSpec defines the desired state of LinodeCluster
3232type LinodeClusterSpec struct {
3333 // region the LinodeCluster lives in.
34+ // +required
3435 Region string `json:"region"`
3536
3637 // controlPlaneEndpoint represents the endpoint used to communicate with the LinodeCluster control plane
@@ -102,11 +103,17 @@ type LinodeClusterStatus struct {
102103// LinodeCluster is the Schema for the linodeclusters API
103104type LinodeCluster struct {
104105 metav1.TypeMeta `json:",inline"`
106+
105107 // metadata is the standard object's metadata.
108+ // +optional
106109 metav1.ObjectMeta `json:"metadata,omitempty"`
110+
107111 // spec is the desired state of the LinodeCluster.
112+ // +optional
108113 Spec LinodeClusterSpec `json:"spec,omitempty"`
114+
109115 // status is the observed state of the LinodeCluster.
116+ // +optional
110117 Status LinodeClusterStatus `json:"status,omitempty"`
111118}
112119
@@ -139,56 +146,69 @@ type NetworkSpec struct {
139146 // +kubebuilder:default=NodeBalancer
140147 // +optional
141148 LoadBalancerType string `json:"loadBalancerType,omitempty"`
149+
142150 // dnsProvider is the provider who manages the domain.
143151 // Ignored if the LoadBalancerType is set to anything other than dns
144152 // If not set, defaults linode dns
145153 // +kubebuilder:validation:Enum=linode;akamai
146154 // +optional
147155 DNSProvider string `json:"dnsProvider,omitempty"`
156+
148157 // dnsRootDomain is the root domain used to create a DNS entry for the control-plane endpoint.
149158 // Ignored if the LoadBalancerType is set to anything other than dns
150159 // +optional
151160 DNSRootDomain string `json:"dnsRootDomain,omitempty"`
161+
152162 // dnsUniqueIdentifier is the unique identifier for the DNS. This let clusters with the same name have unique
153163 // DNS record
154164 // Ignored if the LoadBalancerType is set to anything other than dns
155165 // If not set, CAPL will create a unique identifier for you
156166 // +optional
157167 DNSUniqueIdentifier string `json:"dnsUniqueIdentifier,omitempty"`
168+
158169 // dnsTTLsec is the TTL for the domain record
159170 // Ignored if the LoadBalancerType is set to anything other than dns
160171 // If not set, defaults to 30
161172 // +optional
162173 DNSTTLSec int `json:"dnsTTLsec,omitempty"`
174+
163175 // dnsSubDomainOverride is used to override CAPL's construction of the controlplane endpoint
164176 // If set, this will override the DNS subdomain from <clustername>-<uniqueid>.<rootdomain> to <overridevalue>.<rootdomain>
165177 // +optional
166178 DNSSubDomainOverride string `json:"dnsSubDomainOverride,omitempty"`
179+
167180 // apiserverLoadBalancerPort used by the api server. It must be valid ports range (1-65535).
168181 // If omitted, default value is 6443.
169182 // +kubebuilder:validation:Minimum=1
170183 // +kubebuilder:validation:Maximum=65535
171184 // +optional
172185 ApiserverLoadBalancerPort int `json:"apiserverLoadBalancerPort,omitempty"`
186+
173187 // nodeBalancerID is the id of NodeBalancer.
174188 // +optional
175189 NodeBalancerID * int `json:"nodeBalancerID,omitempty"`
190+
176191 // nodeBalancerFirewallID is the id of NodeBalancer Firewall.
177192 // +optional
178193 NodeBalancerFirewallID * int `json:"nodeBalancerFirewallID,omitempty"`
194+
179195 // apiserverNodeBalancerConfigID is the config ID of api server NodeBalancer config.
180196 // +optional
181197 ApiserverNodeBalancerConfigID * int `json:"apiserverNodeBalancerConfigID,omitempty"`
198+
182199 // additionalPorts contains list of ports to be configured with NodeBalancer.
183200 // +optional
184201 AdditionalPorts []LinodeNBPortConfig `json:"additionalPorts,omitempty"`
202+
185203 // subnetName is the name/label of the VPC subnet to be used by the cluster
186204 // +optional
187205 SubnetName string `json:"subnetName,omitempty"`
206+
188207 // useVlan provisions a cluster that uses VLANs instead of VPCs. IPAM is managed internally.
189208 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
190209 // +optional
191210 UseVlan bool `json:"useVlan,omitempty"`
211+
192212 // nodeBalancerBackendIPv4Range is the subnet range we want to provide for creating nodebalancer in VPC.
193213 // example: 10.10.10.0/30
194214 // +optional
@@ -209,7 +229,9 @@ type LinodeNBPortConfig struct {
209229 // port configured on the NodeBalancer. It must be valid port range (1-65535).
210230 // +kubebuilder:validation:Minimum=1
211231 // +kubebuilder:validation:Maximum=65535
232+ // +required
212233 Port int `json:"port"`
234+
213235 // nodeBalancerConfigID is the config ID of port's NodeBalancer config.
214236 // +optional
215237 NodeBalancerConfigID * int `json:"nodeBalancerConfigID,omitempty"`
@@ -222,11 +244,11 @@ type ObjectStore struct {
222244 //
223245 // This is used to generate presigned URLs for S3 Bucket objects, which are used by
224246 // control-plane and worker nodes to fetch bootstrap data.
225- //
226247 // +optional
227248 PresignedURLDuration * metav1.Duration `json:"presignedURLDuration,omitempty"`
228249
229250 // credentialsRef is a reference to a Secret that contains the credentials to use for accessing the Cluster Object Store.
251+ // +optional
230252 CredentialsRef corev1.SecretReference `json:"credentialsRef,omitempty"`
231253}
232254
0 commit comments