mirror of https://github.com/kubernetes/kops.git
upup: rolling-update should take --name, not --cluster-id
This commit is contained in:
parent
1c4d5eaa43
commit
eb23e22b3c
|
|
@ -13,7 +13,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type RollingUpdateClusterCmd struct {
|
type RollingUpdateClusterCmd struct {
|
||||||
ClusterID string
|
ClusterName string
|
||||||
Yes bool
|
Yes bool
|
||||||
Region string
|
Region string
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ func init() {
|
||||||
|
|
||||||
cmd.Flags().BoolVar(&rollingupdateCluster.Yes, "yes", false, "Rollingupdate without confirmation")
|
cmd.Flags().BoolVar(&rollingupdateCluster.Yes, "yes", false, "Rollingupdate without confirmation")
|
||||||
|
|
||||||
cmd.Flags().StringVar(&rollingupdateCluster.ClusterID, "cluster-id", "", "cluster id")
|
cmd.Flags().StringVar(&rollingupdateCluster.ClusterName, "name", "", "cluster name")
|
||||||
cmd.Flags().StringVar(&rollingupdateCluster.Region, "region", "", "region")
|
cmd.Flags().StringVar(&rollingupdateCluster.Region, "region", "", "region")
|
||||||
|
|
||||||
cmd.Run = func(cmd *cobra.Command, args []string) {
|
cmd.Run = func(cmd *cobra.Command, args []string) {
|
||||||
|
|
@ -49,11 +49,11 @@ func (c *RollingUpdateClusterCmd) Run() error {
|
||||||
if c.Region == "" {
|
if c.Region == "" {
|
||||||
return fmt.Errorf("--region is required")
|
return fmt.Errorf("--region is required")
|
||||||
}
|
}
|
||||||
if c.ClusterID == "" {
|
if c.ClusterName == "" {
|
||||||
return fmt.Errorf("--cluster-id is required")
|
return fmt.Errorf("--name is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
tags := map[string]string{"KubernetesCluster": c.ClusterID}
|
tags := map[string]string{"KubernetesCluster": c.ClusterName}
|
||||||
cloud, err := awsup.NewAWSCloud(c.Region, tags)
|
cloud, err := awsup.NewAWSCloud(c.Region, tags)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error initializing AWS client: %v", err)
|
return fmt.Errorf("error initializing AWS client: %v", err)
|
||||||
|
|
@ -61,7 +61,7 @@ func (c *RollingUpdateClusterCmd) Run() error {
|
||||||
|
|
||||||
d := &kutil.RollingUpdateCluster{}
|
d := &kutil.RollingUpdateCluster{}
|
||||||
|
|
||||||
d.ClusterID = c.ClusterID
|
d.ClusterName = c.ClusterName
|
||||||
d.Region = c.Region
|
d.Region = c.Region
|
||||||
d.Cloud = cloud
|
d.Cloud = cloud
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
// RollingUpdateCluster restarts cluster nodes
|
// RollingUpdateCluster restarts cluster nodes
|
||||||
type RollingUpdateCluster struct {
|
type RollingUpdateCluster struct {
|
||||||
ClusterID string
|
ClusterName string
|
||||||
Region string
|
Region string
|
||||||
Cloud fi.Cloud
|
Cloud fi.Cloud
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue