diff --git a/cmd/kops/rolling-update_cluster.go b/cmd/kops/rolling-update_cluster.go index b79b155a23..6e601e15d3 100644 --- a/cmd/kops/rolling-update_cluster.go +++ b/cmd/kops/rolling-update_cluster.go @@ -119,10 +119,10 @@ type RollingUpdateOptions struct { // ValidateCount is the amount of time that a cluster needs to be validated after single node update ValidateCount int32 - // MasterInterval is the minimum time to wait after stopping a master node. This does not include drain and validate time. - MasterInterval time.Duration + // ControlPlaneInterval is the minimum time to wait after stopping a control-plane node. This does not include drain and validate time. + ControlPlaneInterval time.Duration - // NodeInterval is the minimum time to wait after stopping a (non-master) node. This does not include drain and validate time. + // NodeInterval is the minimum time to wait after stopping a (non-control-plane) node. This does not include drain and validate time. NodeInterval time.Duration // BastionInterval is the minimum time to wait after stopping a bastion. This does not include drain and validate time. @@ -152,7 +152,7 @@ func (o *RollingUpdateOptions) InitDefaults() { o.FailOnDrainError = false o.FailOnValidate = true - o.MasterInterval = 15 * time.Second + o.ControlPlaneInterval = 15 * time.Second o.NodeInterval = 15 * time.Second o.BastionInterval = 15 * time.Second o.Interactive = false @@ -194,7 +194,7 @@ func NewCmdRollingUpdateCluster(f *util.Factory, out io.Writer) *cobra.Command { cmd.Flags().DurationVar(&options.ValidationTimeout, "validation-timeout", options.ValidationTimeout, "Maximum time to wait for a cluster to validate") cmd.Flags().DurationVar(&options.DrainTimeout, "drain-timeout", options.DrainTimeout, "Maximum time to wait for a node to drain") cmd.Flags().Int32Var(&options.ValidateCount, "validate-count", options.ValidateCount, "Number of times that a cluster needs to be validated after single node update") - cmd.Flags().DurationVar(&options.MasterInterval, "master-interval", options.MasterInterval, "Time to wait between restarting control plane nodes") + cmd.Flags().DurationVar(&options.ControlPlaneInterval, "control-plane-interval", options.ControlPlaneInterval, "Time to wait between restarting control plane nodes") cmd.Flags().DurationVar(&options.NodeInterval, "node-interval", options.NodeInterval, "Time to wait between restarting worker nodes") cmd.Flags().DurationVar(&options.BastionInterval, "bastion-interval", options.BastionInterval, "Time to wait between restarting bastions") cmd.Flags().DurationVar(&options.PostDrainDelay, "post-drain-delay", options.PostDrainDelay, "Time to wait after draining each node") @@ -213,6 +213,8 @@ func NewCmdRollingUpdateCluster(f *util.Factory, out io.Writer) *cobra.Command { switch name { case "ig", "instance-groups": name = "instance-group" + case "master-interval": + name = "control-plane-interval" case "role", "roles", "instance-group-role": name = "instance-group-roles" } @@ -345,7 +347,7 @@ func RunRollingUpdateCluster(ctx context.Context, f *util.Factory, out io.Writer Clientset: clientset, Ctx: ctx, Cluster: cluster, - MasterInterval: options.MasterInterval, + MasterInterval: options.ControlPlaneInterval, NodeInterval: options.NodeInterval, BastionInterval: options.BastionInterval, Interactive: options.Interactive, diff --git a/docs/cli/kops_rolling-update_cluster.md b/docs/cli/kops_rolling-update_cluster.md index 6e57819682..2b304d7183 100644 --- a/docs/cli/kops_rolling-update_cluster.md +++ b/docs/cli/kops_rolling-update_cluster.md @@ -56,22 +56,22 @@ kops rolling-update cluster [CLUSTER] [flags] ### Options ``` - --bastion-interval duration Time to wait between restarting bastions (default 15s) - --cloudonly Perform rolling update without confirming progress with Kubernetes - --drain-timeout duration Maximum time to wait for a node to drain (default 15m0s) - --fail-on-drain-error Fail if draining a node fails (default true) - --fail-on-validate-error Fail if the cluster fails to validate (default true) - --force Force rolling update, even if no changes - -h, --help help for cluster - --instance-group strings Instance groups to update (defaults to all if not specified) - --instance-group-roles strings Instance group roles to update (control-plane,apiserver,node,bastion) - -i, --interactive Prompt to continue after each instance is updated - --master-interval duration Time to wait between restarting control plane nodes (default 15s) - --node-interval duration Time to wait between restarting worker nodes (default 15s) - --post-drain-delay duration Time to wait after draining each node (default 5s) - --validate-count int32 Number of times that a cluster needs to be validated after single node update (default 2) - --validation-timeout duration Maximum time to wait for a cluster to validate (default 15m0s) - -y, --yes Perform rolling update immediately; without --yes rolling-update executes a dry-run + --bastion-interval duration Time to wait between restarting bastions (default 15s) + --cloudonly Perform rolling update without confirming progress with Kubernetes + --control-plane-interval duration Time to wait between restarting control plane nodes (default 15s) + --drain-timeout duration Maximum time to wait for a node to drain (default 15m0s) + --fail-on-drain-error Fail if draining a node fails (default true) + --fail-on-validate-error Fail if the cluster fails to validate (default true) + --force Force rolling update, even if no changes + -h, --help help for cluster + --instance-group strings Instance groups to update (defaults to all if not specified) + --instance-group-roles strings Instance group roles to update (control-plane,apiserver,node,bastion) + -i, --interactive Prompt to continue after each instance is updated + --node-interval duration Time to wait between restarting worker nodes (default 15s) + --post-drain-delay duration Time to wait after draining each node (default 5s) + --validate-count int32 Number of times that a cluster needs to be validated after single node update (default 2) + --validation-timeout duration Maximum time to wait for a cluster to validate (default 15m0s) + -y, --yes Perform rolling update immediately; without --yes rolling-update executes a dry-run ``` ### Options inherited from parent commands