1
0
mirror of https://github.com/rancher/types.git synced 2025-08-07 15:33:29 +00:00

updated NodeUpgradeStrategy.Drain to use a pointer

This commit is contained in:
Jacob Payne 2020-10-12 09:24:06 -07:00
parent fe03f32597
commit 939fc7cedd
3 changed files with 7 additions and 2 deletions

View File

@ -71,7 +71,7 @@ type NodeUpgradeStrategy struct {
MaxUnavailableWorker string `yaml:"max_unavailable_worker" json:"maxUnavailableWorker,omitempty" norman:"min=1,default=10%"`
// MaxUnavailableControlplane input can be a number of nodes or a percentage of nodes
MaxUnavailableControlplane string `yaml:"max_unavailable_controlplane" json:"maxUnavailableControlplane,omitempty" norman:"min=1,default=1"`
Drain bool `yaml:"drain" json:"drain,omitempty"`
Drain *bool `yaml:"drain" json:"drain,omitempty"`
DrainInput *NodeDrainInput `yaml:"node_drain_input" json:"nodeDrainInput,omitempty"`
}

View File

@ -6530,6 +6530,11 @@ func (in *NodeTemplateStatus) DeepCopy() *NodeTemplateStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeUpgradeStrategy) DeepCopyInto(out *NodeUpgradeStrategy) {
*out = *in
if in.Drain != nil {
in, out := &in.Drain, &out.Drain
*out = new(bool)
**out = **in
}
if in.DrainInput != nil {
in, out := &in.DrainInput, &out.DrainInput
*out = new(NodeDrainInput)

View File

@ -9,7 +9,7 @@ const (
)
type NodeUpgradeStrategy struct {
Drain bool `json:"drain,omitempty" yaml:"drain,omitempty"`
Drain *bool `json:"drain,omitempty" yaml:"drain,omitempty"`
DrainInput *NodeDrainInput `json:"nodeDrainInput,omitempty" yaml:"nodeDrainInput,omitempty"`
MaxUnavailableControlplane string `json:"maxUnavailableControlplane,omitempty" yaml:"maxUnavailableControlplane,omitempty"`
MaxUnavailableWorker string `json:"maxUnavailableWorker,omitempty" yaml:"maxUnavailableWorker,omitempty"`