Skip to content

Commit

Permalink
add more params to cluster_create.go
Browse files Browse the repository at this point in the history
  • Loading branch information
robertchoi80 committed Mar 17, 2022
1 parent 12218a6 commit 9cb663f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/cluster_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

const (
address = "tks-cluster-lcm.taco-cat.xyz:9110"
//address = "localhost:9110"
)

// clusterCreateCmd represents the create command
Expand Down Expand Up @@ -63,7 +64,7 @@ tks cluster create <CLUSTERNAME> --contract-id <CONTRACTID> --csp-id <CSPID>`,
ContractId, _ := cmd.Flags().GetString("contract-id")
CspId, _ := cmd.Flags().GetString("csp-id")

conf := &pb.ClusterRawConf{}
conf := pb.ClusterRawConf{}
conf.SshKeyName, _ = cmd.Flags().GetString("ssh-key-name")
conf.Region, _ = cmd.Flags().GetString("region")
conf.MachineType, _ = cmd.Flags().GetString("machine-type")
Expand All @@ -79,7 +80,7 @@ tks cluster create <CLUSTERNAME> --contract-id <CONTRACTID> --csp-id <CSPID>`,
Name: ClusterName,
ContractId: ContractId,
CspId: CspId,
Conf: conf,
Conf: &conf,
}

m := protojson.MarshalOptions{
Expand Down Expand Up @@ -110,4 +111,9 @@ func init() {
clusterCreateCmd.MarkFlagRequired("contract-id")
clusterCreateCmd.Flags().String("csp-id", "", "CSP ID")
clusterCreateCmd.MarkFlagRequired("csp-id")
clusterCreateCmd.Flags().String("region", "", "AWS Region")
clusterCreateCmd.Flags().String("num-of-az", "", "Number of availability zones in selected region")
clusterCreateCmd.Flags().String("ssh-key-name", "", "SSH key name for EC2 instance connection")
clusterCreateCmd.Flags().String("machine-type", "", "machine type of worker node")
clusterCreateCmd.Flags().String("machine-replicas", "", "machine replicas of worker node")
}

0 comments on commit 9cb663f

Please sign in to comment.