mirror of https://github.com/kubernetes/kops.git
Update rolling update ig roles flag to be case insensitive
This commit is contained in:
parent
af4df08b69
commit
7b5cb2dc33
|
@ -21,6 +21,7 @@ import (
|
|||
"io"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
@ -181,7 +182,7 @@ func NewCmdRollingUpdateCluster(f *util.Factory, out io.Writer) *cobra.Command {
|
|||
cmd.Flags().DurationVar(&options.BastionInterval, "bastion-interval", options.BastionInterval, "Time to wait between restarting bastions")
|
||||
cmd.Flags().BoolVarP(&options.Interactive, "interactive", "i", options.Interactive, "Prompt to continue after each instance is updated")
|
||||
cmd.Flags().StringSliceVar(&options.InstanceGroups, "instance-group", options.InstanceGroups, "List of instance groups to update (defaults to all if not specified)")
|
||||
cmd.Flags().StringSliceVar(&options.InstanceGroupRoles, "instance-group-roles", options.InstanceGroupRoles, "If specified, only instance groups of the specified role will be updated")
|
||||
cmd.Flags().StringSliceVar(&options.InstanceGroupRoles, "instance-group-roles", options.InstanceGroupRoles, "If specified, only instance groups of the specified role will be updated (e.g. Master,Node,Bastion)")
|
||||
|
||||
if featureflag.DrainAndValidateRollingUpdate.Enabled() {
|
||||
cmd.Flags().BoolVar(&options.FailOnDrainError, "fail-on-drain-error", true, "The rolling-update will fail if draining a node fails.")
|
||||
|
@ -295,7 +296,7 @@ func RunRollingUpdateCluster(f *util.Factory, out io.Writer, options *RollingUpd
|
|||
|
||||
for _, ig := range instanceGroups {
|
||||
for _, role := range options.InstanceGroupRoles {
|
||||
if ig.Spec.Role == api.InstanceGroupRole(role) {
|
||||
if ig.Spec.Role == api.InstanceGroupRole(strings.Title(strings.ToLower(role))) {
|
||||
filtered = append(filtered, ig)
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ kops rolling-update cluster [flags]
|
|||
--force Force rolling update, even if no changes
|
||||
-h, --help help for cluster
|
||||
--instance-group strings List of instance groups to update (defaults to all if not specified)
|
||||
--instance-group-roles strings If specified, only instance groups of the specified role will be updated
|
||||
--instance-group-roles strings If specified, only instance groups of the specified role will be updated (e.g. Master,Node,Bastion)
|
||||
-i, --interactive Prompt to continue after each instance is updated
|
||||
--master-interval duration Time to wait between restarting masters (default 5m0s)
|
||||
--node-interval duration Time to wait between restarting nodes (default 4m0s)
|
||||
|
|
Loading…
Reference in New Issue