Skip to content

Commit ef0cc1a

Browse files
committed
fix: removes omitempty from nodeadm template
1 parent 0bdb879 commit ef0cc1a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

bootstrap/eks/api/v1beta2/nodeadmconfigtemplate_type.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ type NodeadmConfigTemplateSpec struct {
2727

2828
// NodeadmConfigTemplateResource defines the Template structure.
2929
type NodeadmConfigTemplateResource struct {
30+
// Spec represents the NodeadmConfig each object created from the template will become.
31+
// We are setting nullable to avoid this issue:
32+
// https://github.com/kubernetes/kubernetes/issues/117447#issuecomment-2127733969
33+
// where we cannot remove all fields with an SSA patch if they were previously set.
34+
// +nullable
3035
Spec NodeadmConfigSpec `json:"spec,omitempty"`
3136
}
3237

config/crd/bases/bootstrap.cluster.x-k8s.io_nodeadmconfigtemplates.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ spec:
4949
description: NodeadmConfigTemplateResource defines the Template structure.
5050
properties:
5151
spec:
52-
description: NodeadmConfigSpec defines the desired state of NodeadmConfig.
52+
description: |-
53+
Spec represents the NodeadmConfig each object created from the template will become.
54+
We are setting nullable to avoid this issue:
55+
https://github.com/kubernetes/kubernetes/issues/117447#issuecomment-2127733969
56+
where we cannot remove all fields with an SSA patch if they were previously set.
57+
nullable: true
5358
properties:
5459
containerd:
5560
description: Containerd contains options for containerd.

0 commit comments

Comments
 (0)