Skip to content

Commit 1b20582

Browse files
committed
fix: empty cp taints example
The docs to remove the default control plane taints instruct the user to set the value to _an empty slice, i.e. `taints: {}` in the YAML file_ , but an empty slice is equal to an empty yaml array: `taints: []`.
1 parent 5dcb8e0 commit 1b20582

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

bootstrap/kubeadm/api/v1beta1/kubeadm_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ type NodeRegistrationOptions struct {
228228

229229
// Taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process
230230
// it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an
231-
// empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration.
231+
// empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration.
232232
// +optional
233233
Taints []corev1.Taint `json:"taints,omitempty"`
234234

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,7 +2617,7 @@ spec:
26172617
nil, in the `kubeadm init` process it will be defaulted
26182618
to []v1.Taint{''node-role.kubernetes.io/master=""''}. If
26192619
you don''t want to taint your control-plane node, set this
2620-
field to an empty slice, i.e. `taints: {}` in the YAML file.
2620+
field to an empty slice, i.e. `taints: []` in the YAML file.
26212621
This field is solely used for Node registration.'
26222622
items:
26232623
description: The node this Taint is attached to has the
@@ -2828,7 +2828,7 @@ spec:
28282828
nil, in the `kubeadm init` process it will be defaulted
28292829
to []v1.Taint{''node-role.kubernetes.io/master=""''}. If
28302830
you don''t want to taint your control-plane node, set this
2831-
field to an empty slice, i.e. `taints: {}` in the YAML file.
2831+
field to an empty slice, i.e. `taints: []` in the YAML file.
28322832
This field is solely used for Node registration.'
28332833
items:
28342834
description: The node this Taint is attached to has the

bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,7 +2646,7 @@ spec:
26462646
it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}.
26472647
If you don''t want to taint your control-plane node,
26482648
set this field to an empty slice, i.e. `taints:
2649-
{}` in the YAML file. This field is solely used
2649+
[]` in the YAML file. This field is solely used
26502650
for Node registration.'
26512651
items:
26522652
description: The node this Taint is attached to
@@ -2872,7 +2872,7 @@ spec:
28722872
it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}.
28732873
If you don''t want to taint your control-plane node,
28742874
set this field to an empty slice, i.e. `taints:
2875-
{}` in the YAML file. This field is solely used
2875+
[]` in the YAML file. This field is solely used
28762876
for Node registration.'
28772877
items:
28782878
description: The node this Taint is attached to

controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3089,7 +3089,7 @@ spec:
30893089
i.e. nil, in the `kubeadm init` process it will be defaulted
30903090
to []v1.Taint{''node-role.kubernetes.io/master=""''}.
30913091
If you don''t want to taint your control-plane node,
3092-
set this field to an empty slice, i.e. `taints: {}`
3092+
set this field to an empty slice, i.e. `taints: []`
30933093
in the YAML file. This field is solely used for Node
30943094
registration.'
30953095
items:
@@ -3309,7 +3309,7 @@ spec:
33093309
i.e. nil, in the `kubeadm init` process it will be defaulted
33103310
to []v1.Taint{''node-role.kubernetes.io/master=""''}.
33113311
If you don''t want to taint your control-plane node,
3312-
set this field to an empty slice, i.e. `taints: {}`
3312+
set this field to an empty slice, i.e. `taints: []`
33133313
in the YAML file. This field is solely used for Node
33143314
registration.'
33153315
items:

controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,7 @@ spec:
18821882
init` process it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}.
18831883
If you don''t want to taint your control-plane
18841884
node, set this field to an empty slice, i.e.
1885-
`taints: {}` in the YAML file. This field is
1885+
`taints: []` in the YAML file. This field is
18861886
solely used for Node registration.'
18871887
items:
18881888
description: The node this Taint is attached
@@ -2118,7 +2118,7 @@ spec:
21182118
init` process it will be defaulted to []v1.Taint{''node-role.kubernetes.io/master=""''}.
21192119
If you don''t want to taint your control-plane
21202120
node, set this field to an empty slice, i.e.
2121-
`taints: {}` in the YAML file. This field is
2121+
`taints: []` in the YAML file. This field is
21222122
solely used for Node registration.'
21232123
items:
21242124
description: The node this Taint is attached

0 commit comments

Comments
 (0)