Skip to content

Commit

Permalink
fix: empty cp taints example
Browse files Browse the repository at this point in the history
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: []`.
  • Loading branch information
apricote committed Aug 16, 2022
1 parent 5dcb8e0 commit 1b20582
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bootstrap/kubeadm/api/v1beta1/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ type NodeRegistrationOptions struct {

// 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
// 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
// empty slice, i.e. `taints: {}` in the YAML file. This field is solely used for Node registration.
// empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration.
// +optional
Taints []corev1.Taint `json:"taints,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ spec:
nil, in the `kubeadm init` process 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 empty slice, i.e. `taints: {}` in the YAML file.
field to an empty slice, i.e. `taints: []` in the YAML file.
This field is solely used for Node registration.'
items:
description: The node this Taint is attached to has the
Expand Down Expand Up @@ -2828,7 +2828,7 @@ spec:
nil, in the `kubeadm init` process 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 empty slice, i.e. `taints: {}` in the YAML file.
field to an empty slice, i.e. `taints: []` in the YAML file.
This field is solely used for Node registration.'
items:
description: The node this Taint is attached to has the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2646,7 +2646,7 @@ spec:
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 empty slice, i.e. `taints:
{}` in the YAML file. This field is solely used
[]` in the YAML file. This field is solely used
for Node registration.'
items:
description: The node this Taint is attached to
Expand Down Expand Up @@ -2872,7 +2872,7 @@ spec:
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 empty slice, i.e. `taints:
{}` in the YAML file. This field is solely used
[]` in the YAML file. This field is solely used
for Node registration.'
items:
description: The node this Taint is attached to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3089,7 +3089,7 @@ spec:
i.e. nil, in the `kubeadm init` process 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 empty slice, i.e. `taints: {}`
set this field to an empty slice, i.e. `taints: []`
in the YAML file. This field is solely used for Node
registration.'
items:
Expand Down Expand Up @@ -3309,7 +3309,7 @@ spec:
i.e. nil, in the `kubeadm init` process 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 empty slice, i.e. `taints: {}`
set this field to an empty slice, i.e. `taints: []`
in the YAML file. This field is solely used for Node
registration.'
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@ spec:
init` process 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 empty slice, i.e.
`taints: {}` in the YAML file. This field is
`taints: []` in the YAML file. This field is
solely used for Node registration.'
items:
description: The node this Taint is attached
Expand Down Expand Up @@ -2118,7 +2118,7 @@ spec:
init` process 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 empty slice, i.e.
`taints: {}` in the YAML file. This field is
`taints: []` in the YAML file. This field is
solely used for Node registration.'
items:
description: The node this Taint is attached
Expand Down

0 comments on commit 1b20582

Please sign in to comment.