diff --git a/apis/management.cattle.io/v3/machine_types.go b/apis/management.cattle.io/v3/machine_types.go index b3555d56..aed61a59 100644 --- a/apis/management.cattle.io/v3/machine_types.go +++ b/apis/management.cattle.io/v3/machine_types.go @@ -302,17 +302,17 @@ type PublicEndpoint struct { type NodeDrainInput struct { // Drain node even if there are pods not managed by a ReplicationController, Job, or DaemonSet // Drain will not proceed without Force set to true if there are such pods - Force bool `json:"force,omitempty"` + Force bool `yaml:"force" json:"force,omitempty"` // If there are DaemonSet-managed pods, drain will not proceed without IgnoreDaemonSets set to true // (even when set to true, kubectl won't delete pods - so setting default to true) - IgnoreDaemonSets bool `json:"ignoreDaemonSets,omitempty" norman:"default=true"` + IgnoreDaemonSets bool `yaml:"ignore_daemonsets" json:"ignoreDaemonSets,omitempty" norman:"default=true"` // Continue even if there are pods using emptyDir - DeleteLocalData bool `json:"deleteLocalData,omitempty"` + DeleteLocalData bool `yaml:"delete_local_data" json:"deleteLocalData,omitempty"` //Period of time in seconds given to each pod to terminate gracefully. // If negative, the default value specified in the pod will be used - GracePeriod int `json:"gracePeriod,omitempty" norman:"default=-1"` + GracePeriod int `yaml:"grace_period" json:"gracePeriod,omitempty" norman:"default=-1"` // Time to wait (in seconds) before giving up for one try - Timeout int `json:"timeout" norman:"min=1,max=10800,default=60"` + Timeout int `yaml:"timeout" json:"timeout" norman:"min=1,max=10800,default=60"` } type CloudCredential struct { diff --git a/apis/management.cattle.io/v3/rke_types.go b/apis/management.cattle.io/v3/rke_types.go index 084d63e5..bddcb748 100644 --- a/apis/management.cattle.io/v3/rke_types.go +++ b/apis/management.cattle.io/v3/rke_types.go @@ -58,6 +58,15 @@ type RancherKubernetesEngineConfig struct { RotateCertificates *RotateCertificates `yaml:"rotate_certificates,omitempty" json:"rotateCertificates,omitempty"` // DNS Config DNS *DNSConfig `yaml:"dns" json:"dns,omitempty"` + // Upgrade Strategy for the cluster + UpgradeStrategy *NodeUpgradeStrategy `yaml:"upgrade_strategy,omitempty" json:"upgradeStrategy,omitempty"` +} + +type NodeUpgradeStrategy struct { + // MaxUnavailable input can be a number of nodes or a percentage of nodes (example, max_unavailable: 2 OR max_unavailable: 20%) + MaxUnavailable string `yaml:"max_unavailable" json:"maxUnavailable,omitempty" norman:"min=1,default=10%"` + Drain bool `yaml:"drain" json:"drain,omitempty"` + DrainInput *NodeDrainInput `yaml:"node_drain_input" json:"nodeDrainInput,omitempty"` } type BastionHost struct {