migrate --register-with-taints to KubeletConfiguration

Kubernetes-commit: bad4faf1b9d69d3cb6e8de90dc5eee1d8cf0b6d3
This commit is contained in:
caozhiyuan 2021-10-04 09:17:10 +08:00 committed by Kubernetes Publisher
parent 468d523207
commit 394f21e52e
2 changed files with 22 additions and 0 deletions

View File

@ -1033,6 +1033,16 @@ type KubeletConfiguration struct {
// +featureGate=MemoryQoS
// +optional
MemoryThrottlingFactor *float64 `json:"memoryThrottlingFactor,omitempty"`
// registerWithTaints are an array of taints to add to a node object when
// the kubelet registers itself. This only takes effect when registerNode
// is true and upon the initial registration of the node.
// Default: nil
// +optional
RegisterWithTaints []v1.Taint `json:"registerWithTaints,omitempty"`
// registerNode enables automatic registration with the apiserver.
// Default: true
// +optional
RegisterNode *bool `json:"registerNode,omitempty"`
}
type KubeletAuthorizationMode string

View File

@ -345,6 +345,18 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) {
*out = new(float64)
**out = **in
}
if in.RegisterWithTaints != nil {
in, out := &in.RegisterWithTaints, &out.RegisterWithTaints
*out = make([]corev1.Taint, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.RegisterNode != nil {
in, out := &in.RegisterNode, &out.RegisterNode
*out = new(bool)
**out = **in
}
return
}