@@ -46,7 +46,7 @@ type KubeadmControlPlaneTemplate struct {
4646
4747 // spec is the desired state of KubeadmControlPlaneTemplate.
4848 // +optional
49- Spec KubeadmControlPlaneTemplateSpec `json:"spec,omitempty"`
49+ Spec KubeadmControlPlaneTemplateSpec `json:"spec,omitempty,omitzero "`
5050}
5151
5252// +kubebuilder:object:root=true
@@ -67,15 +67,16 @@ func init() {
6767}
6868
6969// KubeadmControlPlaneTemplateResource describes the data needed to create a KubeadmControlPlane from a template.
70+ // +kubebuilder:validation:MinProperties=1
7071type KubeadmControlPlaneTemplateResource struct {
7172 // metadata is the standard object's metadata.
7273 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
7374 // +optional
7475 ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`
7576
7677 // spec is the desired state of KubeadmControlPlaneTemplateResource.
77- // +required
78- Spec KubeadmControlPlaneTemplateResourceSpec `json:"spec"`
78+ // +optional
79+ Spec KubeadmControlPlaneTemplateResourceSpec `json:"spec,omitempty,omitzero "`
7980}
8081
8182// KubeadmControlPlaneTemplateResourceSpec defines the desired state of KubeadmControlPlane.
@@ -91,8 +92,8 @@ type KubeadmControlPlaneTemplateResourceSpec struct {
9192
9293 // kubeadmConfigSpec is a KubeadmConfigSpec
9394 // to use for initializing and joining machines to the control plane.
94- // +required
95- KubeadmConfigSpec bootstrapv1.KubeadmConfigSpec `json:"kubeadmConfigSpec"`
95+ // +optional
96+ KubeadmConfigSpec bootstrapv1.KubeadmConfigSpec `json:"kubeadmConfigSpec,omitempty,omitzero "`
9697
9798 // rolloutBefore is a field to indicate a rollout should be performed
9899 // if the specified criteria is met.
0 commit comments