@@ -350,6 +350,9 @@ type FooControlPlaneSpec struct {
350
350
// version defines the desired Kubernetes version for the control plane.
351
351
// The value must be a valid semantic version; also if the value provided by the user does not start with the v prefix, it
352
352
// must be added.
353
+ // +required
354
+ // +kubebuilder:validation:MinLength=1
355
+ // +kubebuilder:validation:MaxLength=256
353
356
Version string ` json:"version"`
354
357
355
358
// See other rules for more details about mandatory/optional fields in ControlPlane spec.
@@ -364,13 +367,17 @@ type FooControlPlaneStatus struct {
364
367
// version represents the minimum Kubernetes version for the control plane machines
365
368
// in the cluster.
366
369
// +optional
367
- Version *string ` json:"version,omitempty"`
370
+ // +kubebuilder:validation:MinLength=1
371
+ // +kubebuilder:validation:MaxLength=256
372
+ Version string ` json:"version,omitempty"`
368
373
369
374
// See other rules for more details about mandatory/optional fields in ControlPlane status.
370
375
// Other fields SHOULD be added based on the needs of your provider.
371
376
}
372
377
```
373
378
379
+ NOTE: To align with API conventions, we recommend since the v1beta2 contract that the ` Version ` field should be
380
+ of type ` string ` (it was ` *string ` before). Both are compatible with the v1beta2 contract though.
374
381
NOTE: The minimum Kubernetes version, and more specifically the API server version, will be used to determine
375
382
when a control plane is fully upgraded (spec.version == status.version) and for enforcing Kubernetes version skew
376
383
policies when a Cluster derived from a ClusterClass is managed by the Topology controller.
@@ -480,13 +487,16 @@ managed control plane providers for AKS, EKS, GKE etc), you SHOULD also implemen
480
487
type FooControlPlaneStatus struct {
481
488
// externalManagedControlPlane is a bool that should be set to true if the Node objects do not exist in the cluster.
482
489
// +optional
483
- ExternalManagedControlPlane bool ` json:"externalManagedControlPlane,omitempty"`
490
+ ExternalManagedControlPlane * bool ` json:"externalManagedControlPlane,omitempty"`
484
491
485
492
// See other rules for more details about mandatory/optional fields in ControlPlane status.
486
493
// Other fields SHOULD be added based on the needs of your provider.
487
494
}
488
495
```
489
496
497
+ NOTE: To align with API conventions, we recommend since the v1beta2 contract that the ` ExternalManagedControlPlane ` field should be
498
+ of type ` *bool ` (it was ` bool ` before). Both are compatible with the v1beta2 contract though.
499
+
490
500
Please note that by representing each control plane instance as Cluster API machine, each control plane instance
491
501
can benefit from several Cluster API behaviours, for example:
492
502
- Machine provisioning workflow (in coordination with an InfraMachine and a BootstrapConfig of your choice)
@@ -521,7 +531,7 @@ type FooControlPlaneInitializationStatus struct {
521
531
// the control plane is fully provisioned or not.
522
532
// NOTE: this field is part of the Cluster API contract, and it is used to orchestrate initial Cluster provisioning.
523
533
// +optional
524
- ControlPlaneInitialized bool ` json:"controlPlaneInitialized,omitempty"`
534
+ ControlPlaneInitialized * bool ` json:"controlPlaneInitialized,omitempty"`
525
535
}
526
536
```
527
537
0 commit comments