@@ -46,7 +46,7 @@ type KubeadmControlPlaneTemplate struct {
46
46
47
47
// spec is the desired state of KubeadmControlPlaneTemplate.
48
48
// +optional
49
- Spec KubeadmControlPlaneTemplateSpec `json:"spec,omitempty"`
49
+ Spec KubeadmControlPlaneTemplateSpec `json:"spec,omitempty,omitzero "`
50
50
}
51
51
52
52
// +kubebuilder:object:root=true
@@ -67,15 +67,16 @@ func init() {
67
67
}
68
68
69
69
// KubeadmControlPlaneTemplateResource describes the data needed to create a KubeadmControlPlane from a template.
70
+ // +kubebuilder:validation:MinProperties=1
70
71
type KubeadmControlPlaneTemplateResource struct {
71
72
// metadata is the standard object's metadata.
72
73
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
73
74
// +optional
74
75
ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"`
75
76
76
77
// spec is the desired state of KubeadmControlPlaneTemplateResource.
77
- // +required
78
- Spec KubeadmControlPlaneTemplateResourceSpec `json:"spec"`
78
+ // +optional
79
+ Spec KubeadmControlPlaneTemplateResourceSpec `json:"spec,omitempty,omitzero "`
79
80
}
80
81
81
82
// KubeadmControlPlaneTemplateResourceSpec defines the desired state of KubeadmControlPlane.
@@ -91,8 +92,8 @@ type KubeadmControlPlaneTemplateResourceSpec struct {
91
92
92
93
// kubeadmConfigSpec is a KubeadmConfigSpec
93
94
// 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 "`
96
97
97
98
// rolloutBefore is a field to indicate a rollout should be performed
98
99
// if the specified criteria is met.
0 commit comments