├── .gitignore ├── README.md ├── client ├── client.go ├── cluster.go ├── kubeconfig.go ├── nodepool.go └── types.go ├── cmd ├── configure.go ├── create.go ├── delete.go ├── get.go ├── root.go ├── scale.go └── use.go ├── config └── config.go ├── go.mod ├── go.sum ├── main.go └── testdata └── create.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | .idea 15 | bin -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ackctl 2 | 3 | `ackctl` 是阿里云容器服务 Kubernetes 版(ACK)的命令行管理工具。 4 | 5 | ## 安装 6 | 7 | macOS: https://ackctl.oss-cn-hangzhou.aliyuncs.com/macOS/ackctl 8 | 9 | Linux: https://ackctl.oss-cn-hangzhou.aliyuncs.com/linux/ackctl 10 | 11 | ## 配置 12 | ### 使用阿里云 CLI 的配置 13 | `ackctl` 支持直接读取 AK 模式的阿里云 CLI 配置,无需重新配置,可以直接使用。其他模式暂不支持。 14 | 15 | ### 手动配置 16 | ```bash 17 | # ackctl configure 18 | ? Access Key Id: **************** 19 | ? Access Key Secret: ****************************** 20 | Ackctl configured. 21 | ``` 22 | 23 | ## 使用 24 | 25 | ### 获取集群列表 26 | ```bash 27 | ackctl get cluster 28 | ID State Region Type Name 29 | ccd9ca1cebbad43e7b61815dd25a4712e running ap-southeast-1 ManagedKubernetes ttttt 30 | c8ae985fb582e4b438f785626420891c2 running cn-hangzhou ManagedKubernetes hangzhou-production 31 | c10a26830ab474634bd5098664eae4021 running cn-hangzhou ManagedKubernetes hangzhou-testing 32 | c3af8a161483d4f8a9253a1200b8dcfcc running cn-shenzhen ManagedKubernetes app-center-testing 33 | c40e56f7f896749479b8e0feec7c37014 running cn-hangzhou ManagedKubernetes ol-edge 34 | c982785cc8bb64a47a066016ab2f4dcf5 waiting cn-zhangjiakou ExternalKubernetes ol-ex 35 | ce7bc8633abe84520bc365328acdcfe6d running cn-shanghai Ask ol-ask-v2 36 | cf53ee0a037dd41ccbddc2efc68779cee running cn-beijing Ask ol-ask-v1 37 | ``` 38 | 39 | ### 创建集群 40 | ```bash 41 | # ackctl create cluster -f testdata/create.json 42 | Starting to create cluster c548b7a5c0a8c4b0a8b7ef71b173a8789 43 | ``` 44 | 45 | ### 配置集群 kubeconfig 46 | 可以单独将一个集群的 kubeconfig 配置到本地: 47 | ```bash 48 | # ackctl use cluster c3af8a16148 49 | ? Config /Users/jonas/.kube/config exists, overwrite? Yes 50 | /Users/jonas/.kube/config updated to use cluster 51 | ``` 52 | 53 | 使用`--all`参数,将多个集群的 kubeconfig 合并后配置到本地,然后使用`kubectl config use-context `即可在集群之间切换,context 的名称为集群名称。 54 | 55 | ```bash 56 | # ackctl use cluster --all 57 | ? Config /Users/jonas/.kube/config exists, overwrite? Yes 58 | Merged kubeConfigs of 7 clusters into: /Users/jonas/.kube/config. 59 | Use 'kubectl config get-contexts' to list contexts. 60 | Use 'kubectl config use-context' to select context. 61 | 62 | # kubectl config get-contexts 63 | CURRENT NAME CLUSTER AUTHINFO NAMESPACE 64 | app-center-testing c3af8a161483d4f8a9253a1200b8dcfcc c3af8a161483d4f8a9253a1200b8dcfcc-kubernetes-admin 65 | hangzhou-production c8ae985fb582e4b438f785626420891c2 c8ae985fb582e4b438f785626420891c2-kubernetes-admin 66 | hangzhou-testing c10a26830ab474634bd5098664eae4021 c10a26830ab474634bd5098664eae4021-kubernetes-admin 67 | ol-ask-v1 cf53ee0a037dd41ccbddc2efc68779cee cf53ee0a037dd41ccbddc2efc68779cee-kubernetes-admin 68 | ol-ask-v2 ce7bc8633abe84520bc365328acdcfe6d ce7bc8633abe84520bc365328acdcfe6d-kubernetes-admin 69 | ol-edge c40e56f7f896749479b8e0feec7c37014 c40e56f7f896749479b8e0feec7c37014-kubernetes-admin 70 | 71 | # kubectl config use-context app-center-testing 72 | Switched to context "app-center-testing". 73 | ``` 74 | 75 | ### 删除集群 76 | ```bash 77 | # ackctl delete cluster c9c86da441c 78 | ? Are you sure to delete cluster test(c9c86da441ced45208c85a9ff2eca5b4b)? Cluster cannot be restored after deletion Yes 79 | Starting to delete cluster test(c9c86da441ced45208c85a9ff2eca5b4b) 80 | ``` 81 | 82 | ### 查询集群节点池 83 | `ackctl get nodepool`,使用`--cluster-id`或`-c`指定集群 ID。 84 | ```bash 85 | # ackctl get nodepool -c c8ae985fb582e4b438f785626420891c2 86 | Name Id State Total Serving Offline 87 | default-nodepool np7081d5cc325e4019a6f740ee1ca7c7da active 3 3 0 88 | nodepool1 npdf426eef3bc54957bf0a59e314a15fa6 active 1 1 0 89 | ``` 90 | 91 | ### 查询节点列表 92 | `ackctl get nodepool`,使用`--cluster-id`或`-c`指定集群 ID;使用`--node-pool-id`或`-p`指定节点池。 93 | 94 | ```bash 95 | # ackctl get node -c c8ae985fb582e4b438f785626420891c2 -p np7081d5cc325e4019a6f740ee1ca7c7da 96 | Instance Id Node Name Instance Status Role Instance Type Node Status 97 | i-bp1g91typs6213lznpj1 cn-hangzhou.10.1.41.111 Ready Worker ecs.hfc6.xlarge running 98 | i-bp1g91typs6213lznpj1 cn-hangzhou.10.1.41.111 Ready Worker ecs.hfc6.xlarge running 99 | i-bp1g91typs6213lznpj1 cn-hangzhou.10.1.41.111 Ready Worker ecs.hfc6.xlarge running 100 | ``` 101 | 102 | ### 扩容节点池 103 | `ackctl scale nodepool `,使用`--cluster-id`或`-c`指定集群 ID;使用`--increment`指定扩容数量。 104 | ```bash 105 | # ackctl scale nodepool np7081d5cc325e4019a6f740ee1ca7c7da -c c8ae985fb582e4b438f785626420891c2 --increment 1 106 | Staring to scale node pool np7081d5cc325e4019a6f740ee1ca7c7da of cluster c8ae985fb582e4b438f785626420891c2 107 | 108 | # ackctl get nodepool -c c8ae985fb582e4b438f785626420891c2 109 | Name Id State Total Serving Offline 110 | default-nodepool np7081d5cc325e4019a6f740ee1ca7c7da scaling 3 3 0 111 | nodepool1 npdf426eef3bc54957bf0a59e314a15fa6 active 1 1 0 112 | ``` 113 | 114 | ## Feature roadmap 115 | - 移除节点 116 | - 创建/删除节点池 -------------------------------------------------------------------------------- /client/client.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "github.com/aliyun/alibaba-cloud-sdk-go/sdk" 6 | "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" 7 | "github.com/denverdino/aliyungo/cs" 8 | "github.com/jqlu/ackctl/config" 9 | "sync" 10 | ) 11 | 12 | var once1, once2 sync.Once 13 | var csClient *cs.Client 14 | var sdkClient *SdkClient 15 | 16 | func GetCsClient() *cs.Client { 17 | once1.Do(func() { 18 | akConfig := config.MustLoadConfig() 19 | if akConfig != nil { 20 | csClient = cs.NewClient(akConfig.AccessKeyId, akConfig.AccessKeySecret) 21 | } 22 | }) 23 | return csClient 24 | } 25 | 26 | func GetSdkClient() *SdkClient { 27 | once2.Do(func() { 28 | akConfig := config.MustLoadConfig() 29 | client, err := sdk.NewClientWithAccessKey("cn-hangzhou", akConfig.AccessKeyId, akConfig.AccessKeySecret) 30 | if err != nil { 31 | panic(err) 32 | } 33 | sdkClient = &SdkClient{client: client} 34 | }) 35 | 36 | return sdkClient 37 | } 38 | 39 | type SdkClient struct { 40 | client *sdk.Client 41 | } 42 | 43 | func (c *SdkClient) Request(method string, path string, query map[string]string, body *[]byte, result interface{}) error { 44 | request := requests.NewCommonRequest() 45 | request.Method = method 46 | request.Product = "CS" 47 | request.Domain = "cs.aliyuncs.com" 48 | request.Version = "2015-12-15" 49 | request.PathPattern = path 50 | request.Scheme = "http" 51 | request.QueryParams = query 52 | 53 | if body != nil { 54 | request.SetContentType("application/json") 55 | request.SetContent(*body) 56 | } 57 | 58 | request.TransToAcsRequest() 59 | response, err := c.client.ProcessCommonRequest(request) 60 | if err != nil { 61 | return err 62 | } 63 | 64 | if result != nil { 65 | err := json.Unmarshal(response.GetHttpContentBytes(), result) 66 | if err != nil { 67 | return err 68 | } 69 | } 70 | 71 | return nil 72 | } -------------------------------------------------------------------------------- /client/cluster.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "github.com/denverdino/aliyungo/cs" 6 | "strings" 7 | ) 8 | 9 | type ClusterCreateResponse struct { 10 | ClusterId string `json:"cluster_id"` 11 | } 12 | 13 | func FindClusterByPrefix(prefix string) (*cs.ClusterType, error) { 14 | client := GetCsClient() 15 | clusters, err := client.DescribeClusters("") 16 | if err != nil { 17 | return nil, fmt.Errorf("failed to fetch cluster list") 18 | } 19 | 20 | var filtered []cs.ClusterType 21 | for _, c := range clusters { 22 | if strings.HasPrefix(c.ClusterID, prefix) { 23 | filtered = append(filtered, c) 24 | } 25 | } 26 | 27 | if len(filtered) == 0 { 28 | return nil, fmt.Errorf("no cluster matching the prefix %s", prefix) 29 | } 30 | 31 | if len(filtered) > 1 { 32 | return nil, fmt.Errorf("ambiguous cluster id prefix: %s", prefix) 33 | } 34 | 35 | return &filtered[0], nil 36 | } 37 | 38 | func GetAccessibleClusters() ([]*cs.ClusterType, error) { 39 | client := GetCsClient() 40 | clusters, err := client.DescribeClusters("") 41 | if err != nil { 42 | return nil, fmt.Errorf("failed to fetch cluster list") 43 | } 44 | 45 | var result []*cs.ClusterType 46 | for i, c := range clusters { 47 | if c.ClusterType != "aliyun" && (c.State == cs.Running || c.State == cs.Scaling) { 48 | result = append(result, &clusters[i]) 49 | } 50 | } 51 | 52 | return result, nil 53 | } 54 | 55 | func CreateCluster(params []byte) (*ClusterCreateResponse, error) { 56 | client := GetSdkClient() 57 | 58 | var response ClusterCreateResponse 59 | err := client.Request("POST", "/clusters", nil, ¶ms, &response) 60 | if err != nil { 61 | return nil, err 62 | } 63 | 64 | return &response, nil 65 | } 66 | -------------------------------------------------------------------------------- /client/kubeconfig.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "github.com/denverdino/aliyungo/cs" 6 | "github.com/imdario/mergo" 7 | "k8s.io/client-go/tools/clientcmd" 8 | clientcmdapi "k8s.io/client-go/tools/clientcmd/api" 9 | "log" 10 | "sync" 11 | ) 12 | 13 | func GetMergedKubeConfig(clusters []*cs.ClusterType) ([]byte, error) { 14 | var result []*Cluster 15 | wg := sync.WaitGroup{} 16 | ch := make(chan *Cluster, len(clusters)) 17 | client := GetCsClient() 18 | 19 | for _, c := range clusters { 20 | wg.Add(1) 21 | go func(c *cs.ClusterType) { 22 | defer wg.Done() 23 | config, err := client.DescribeClusterUserConfig(c.ClusterID, false) 24 | if err != nil { 25 | log.Printf("failed to get kubeconfig for cluster %s: %v", c.Name, err) 26 | } 27 | ch <- &Cluster{ 28 | ClusterType: c, 29 | KubeConfig: config, 30 | } 31 | }(c) 32 | } 33 | 34 | wg.Wait() 35 | close(ch) 36 | 37 | for v := range ch { 38 | result = append(result, v) 39 | } 40 | 41 | if len(result) == 1 { 42 | return []byte(result[0].KubeConfig.Config), nil 43 | } 44 | 45 | return mergeKubeConfigs(result) 46 | } 47 | 48 | func mergeKubeConfigs(clusters []*Cluster) ([]byte, error) { 49 | configs := make([]*clientcmdapi.Config, 0) 50 | for _, c := range clusters { 51 | if config, err := clientcmd.Load([]byte(c.KubeConfig.Config)); err == nil { 52 | updateConfig(c, config) 53 | configs = append(configs, config) 54 | } 55 | } 56 | 57 | mapConfig := clientcmdapi.NewConfig() 58 | 59 | for _, kubeconfig := range configs { 60 | mergo.Merge(mapConfig, kubeconfig, mergo.WithOverride) 61 | } 62 | 63 | // merge all of the struct values in the reverse order so that priority is given correctly 64 | // errors are not added to the list the second time 65 | nonMapConfig := clientcmdapi.NewConfig() 66 | for i := len(configs) - 1; i >= 0; i-- { 67 | kubeconfig := configs[i] 68 | mergo.Merge(nonMapConfig, kubeconfig, mergo.WithOverride) 69 | } 70 | 71 | // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and 72 | // get the values we expect. 73 | config := clientcmdapi.NewConfig() 74 | mergo.Merge(config, mapConfig, mergo.WithOverride) 75 | mergo.Merge(config, nonMapConfig, mergo.WithOverride) 76 | 77 | return clientcmd.Write(*config) 78 | } 79 | 80 | func updateConfig(cluster *Cluster, config *clientcmdapi.Config) { 81 | clusterKeys := make([]string, 0) 82 | for k, _ := range config.Clusters { 83 | clusterKeys = append(clusterKeys, k) 84 | } 85 | for _, k := range clusterKeys { 86 | config.Clusters[cluster.ClusterID] = config.Clusters[k] 87 | delete(config.Clusters, k) 88 | } 89 | 90 | authInfoKeys := make([]string, 0) 91 | authInfoName := "" 92 | for k, _ := range config.AuthInfos { 93 | authInfoKeys = append(authInfoKeys, k) 94 | } 95 | for _, k := range authInfoKeys { 96 | authInfoName = fmt.Sprintf("%s-%s", cluster.ClusterID, k) 97 | config.AuthInfos[authInfoName] = config.AuthInfos[k] 98 | delete(config.AuthInfos, k) 99 | } 100 | 101 | contextKeys := make([]string, 0) 102 | for k, v := range config.Contexts { 103 | contextKeys = append(contextKeys, k) 104 | v.Cluster = cluster.ClusterID 105 | v.AuthInfo = authInfoName 106 | } 107 | 108 | for _, k := range contextKeys { 109 | config.Contexts[cluster.Name] = config.Contexts[k] 110 | delete(config.Contexts, k) 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /client/nodepool.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "github.com/denverdino/aliyungo/common" 7 | v1 "k8s.io/api/core/v1" 8 | "strconv" 9 | "time" 10 | ) 11 | 12 | type Taints []v1.Taint 13 | type SpotPrice struct { 14 | InstanceType string `json:"instance_type"` 15 | PriceLimit string `json:"price_limit"` 16 | } 17 | 18 | type TagItemType struct { 19 | Key string `json:"key"` 20 | Value string `json:"value"` 21 | } 22 | type Tags []*TagItemType 23 | 24 | type NodePoolInfo struct { 25 | NodePoolId string `json:"nodepool_id"` 26 | RegionId common.Region `json:"region_id"` 27 | Name string `json:"name"` 28 | Created time.Time `json:"created"` 29 | Updated time.Time `json:"updated"` 30 | IsDefault bool `json:"is_default"` 31 | NodepoolType string `json:"type"` 32 | ResourceGroupId string `json:"resource_group_id"` 33 | } 34 | 35 | type NodePoolStatus struct { 36 | TotalNodes int `json:"total_nodes"` 37 | OfflineNodes int `json:"offline_nodes"` 38 | ServingNodes int `json:"serving_nodes"` 39 | RemovingNodes int `json:"removing_nodes"` 40 | FailedNodes int `json:"failed_nodes"` 41 | InitialNodes int `json:"initial_nodes"` 42 | HealthyNodes int `json:"healthy_nodes"` 43 | State string `json:"state"` 44 | } 45 | 46 | type BasicNodePool struct { 47 | NodePoolInfo `json:"nodepool_info"` 48 | NodePoolStatus `json:"status"` 49 | } 50 | 51 | type NodeKubernetesConfig struct { 52 | CpuPolicy string `json:"cpu_policy"` 53 | Runtime string `json:"runtime,omitempty"` 54 | RuntimeVersion string `json:"runtime_version"` 55 | 56 | Labels Labels `json:"labels"` 57 | Taints Taints `json:"taints"` 58 | } 59 | 60 | type Labels []Label 61 | 62 | type Label struct { 63 | Key string `json:"key"` 64 | Value string `json:"value"` 65 | } 66 | 67 | type ScalingGroup struct { 68 | ScalingGroupId string `json:"scaling_group_id"` 69 | ScalingGroupConfig 70 | } 71 | 72 | type ScalingGroupConfig struct { 73 | VSwitches []string `json:"vswitch_ids"` 74 | SecurityGroupId string `json:"security_group_id"` 75 | InstanceTypes []string `json:"instance_types"` 76 | SystemDiskCategory string `json:"system_disk_category"` 77 | SystemDiskSize int64 `json:"system_disk_size"` 78 | DataDisks []DataDisk `json:"data_disks"` 79 | 80 | Platform string `json:"platform"` 81 | ImageId string `json:"image_id"` 82 | 83 | LoginPassword string `json:"login_password"` 84 | KeyPair string `json:"key_pair"` 85 | 86 | InstanceChargeType string `json:"instance_charge_type"` 87 | Period int `json:"period"` 88 | PeriodUnit string `json:"period_unit"` 89 | AutoRenew bool `json:"auto_renew"` 90 | AutoRenewPeriod int `json:"auto_renew_period"` 91 | SpotStrategy string `json:"spot_strategy"` 92 | SpotPriceLimit []SpotPrice `json:"spot_price_limit"` 93 | 94 | Tags Tags `json:"tags"` 95 | } 96 | 97 | type DataDisk struct { 98 | Size int `json:"size"` 99 | Category string `json:"category"` 100 | } 101 | 102 | type AutoScaling struct { 103 | Enable bool `json:"enable"` 104 | ScalingGroupType string `json:"type"` 105 | MaxInstances int64 `json:"max_instances"` 106 | MinInstances int64 `json:"min_instances"` 107 | } 108 | 109 | type TEEConfig struct { 110 | TEEType string `json:"tee_type"` 111 | TEEEnable bool `json:"tee_enable"` 112 | } 113 | 114 | type NodePool struct { 115 | BasicNodePool 116 | NodeKubernetesConfig `json:"kubernetes_config"` 117 | ScalingGroup `json:"scaling_group"` 118 | AutoScaling `json:"auto_scaling"` 119 | TEEConfig `json:"tee_config"` 120 | } 121 | 122 | type NodePoolList struct { 123 | NodePools []*NodePool `json:"nodepools"` 124 | } 125 | 126 | type NodePoolScaleRequest struct { 127 | Count int `json:"count"` 128 | } 129 | 130 | type Node struct { 131 | InstanceId string `json:"instance_id"` 132 | InstanceName string `json:"instance_name"` 133 | NodeName string `json:"node_name"` 134 | NodeStatus string `json:"node_status"` 135 | State string `json:"state"` 136 | InstanceRole string `json:"instance_role"` 137 | InstanceType string `json:"instance_type"` 138 | InstanceStatus string `json:"instance_status"` 139 | } 140 | 141 | type PageInfo struct { 142 | TotalCount int `json:"total_count"` 143 | PageNumber int `json:"page_number"` 144 | PageSize int `json:"page_size"` 145 | } 146 | 147 | type NodeListResponse struct { 148 | Nodes []Node `json:"nodes"` 149 | Page PageInfo `json:"page"` 150 | } 151 | 152 | type RemoveNodeRequest struct { 153 | Nodes []string `json:"nodes"` 154 | ReleaseNode bool `json:"release_node"` 155 | DrainNode bool `json:"drain_node"'` 156 | } 157 | 158 | func ListNodePools(clusterId string) ([]*NodePool, error) { 159 | client := GetSdkClient() 160 | 161 | var nodePoolList NodePoolList 162 | path := fmt.Sprintf("/clusters/%s/nodepools", clusterId) 163 | err := client.Request("GET", path, nil, nil, &nodePoolList) 164 | if err != nil { 165 | return nil, err 166 | } 167 | 168 | return nodePoolList.NodePools, nil 169 | } 170 | 171 | func ListNodes(clusterId, nodePoolId string) ([]*Node, error) { 172 | client := GetSdkClient() 173 | nodes := make([]*Node, 0) 174 | 175 | var response NodeListResponse 176 | path := fmt.Sprintf("/clusters/%s/nodes", clusterId) 177 | query := map[string]string{ 178 | "nodepool_id": nodePoolId, 179 | "pageNumber": "1", 180 | "pageSize": "100", 181 | "state": "all", 182 | } 183 | 184 | for { 185 | err := client.Request("GET", path, query, nil, &response) 186 | if err != nil { 187 | return nil, err 188 | } 189 | 190 | for _, n := range response.Nodes { 191 | nodes = append(nodes, &n) 192 | } 193 | 194 | if len(nodes) >= response.Page.TotalCount { 195 | break 196 | } 197 | 198 | query["pageNumber"] = strconv.Itoa(response.Page.PageNumber + 1) 199 | } 200 | 201 | return nodes, nil 202 | } 203 | 204 | func ScaleNodePool(clusterId, nodePoolId string, count int) error { 205 | client := GetSdkClient() 206 | 207 | path := fmt.Sprintf("/clusters/%s/nodepools/%s", clusterId, nodePoolId) 208 | request := NodePoolScaleRequest{Count: count} 209 | body, _ := json.Marshal(request) 210 | 211 | err := client.Request("PUT", path, nil, &body, nil) 212 | if err != nil { 213 | return err 214 | } 215 | 216 | return nil 217 | } 218 | 219 | func RemoveNode(clusterId, nodeName string, release, drain bool) error { 220 | client := GetSdkClient() 221 | 222 | path := fmt.Sprintf("/api/v2/clusters/%s/nodes/remove", clusterId) 223 | request := RemoveNodeRequest{ 224 | Nodes: []string{nodeName}, 225 | ReleaseNode: release, 226 | DrainNode: drain, 227 | } 228 | body, _ := json.Marshal(request) 229 | 230 | err := client.Request("POST", path, nil, &body, nil) 231 | if err != nil { 232 | return err 233 | } 234 | 235 | return nil 236 | } 237 | -------------------------------------------------------------------------------- /client/types.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import "github.com/denverdino/aliyungo/cs" 4 | 5 | type Cluster struct { 6 | *cs.ClusterType 7 | 8 | KubeConfig *cs.ClusterConfig 9 | } 10 | -------------------------------------------------------------------------------- /cmd/configure.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "github.com/AlecAivazis/survey/v2" 6 | "github.com/jqlu/ackctl/config" 7 | "github.com/spf13/cobra" 8 | "log" 9 | ) 10 | 11 | var qs = []*survey.Question{ 12 | { 13 | Name: "accessKeyId", 14 | Prompt: &survey.Password{Message: "Access Key Id:"}, 15 | Validate: survey.Required, 16 | }, 17 | { 18 | Name: "accessKeySecret", 19 | Prompt: &survey.Password{Message: "Access Key Secret:"}, 20 | Validate: survey.Required, 21 | }, 22 | } 23 | 24 | func init() { 25 | rootCmd.AddCommand(configureCmd) 26 | } 27 | 28 | var configureCmd = &cobra.Command{ 29 | Use: "configure", 30 | Short: "Configure access to Aliyun", 31 | Long: ``, 32 | Run: func(cmd *cobra.Command, args []string) { 33 | input := config.AkConfig{} 34 | 35 | err := survey.Ask(qs, &input) 36 | if err != nil { 37 | log.Fatalf("Failed to parse input: %v", err) 38 | } 39 | 40 | if err := config.UpdateConfigFile(input); err != nil { 41 | log.Fatal(err) 42 | } 43 | 44 | fmt.Println("Ackctl configured.") 45 | }, 46 | } -------------------------------------------------------------------------------- /cmd/create.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "github.com/jqlu/ackctl/client" 6 | "github.com/spf13/cobra" 7 | "io/ioutil" 8 | "log" 9 | "os" 10 | "path/filepath" 11 | ) 12 | 13 | func init() { 14 | createCmd.AddCommand(newCreateClusterCmd()) 15 | rootCmd.AddCommand(createCmd) 16 | } 17 | 18 | var createCmd = &cobra.Command{ 19 | Use: "create", 20 | Short: "Create resource(s)", 21 | Long: ``, 22 | Run: func(cmd *cobra.Command, args []string) { 23 | 24 | }, 25 | } 26 | 27 | func newCreateClusterCmd() *cobra.Command { 28 | var ( 29 | file string 30 | ) 31 | command := &cobra.Command{ 32 | Use: "cluster", 33 | Short: "Create a cluster", 34 | Long: ``, 35 | Run: func(cmd *cobra.Command, args []string) { 36 | path, err := filepath.Abs(file) 37 | if err != nil { 38 | log.Fatalf("failed to parse file path: %v", err) 39 | } 40 | 41 | params, err := ioutil.ReadFile(path) 42 | if err != nil { 43 | log.Fatalf("failed to read file %s: %v", path, err) 44 | } 45 | 46 | response, err := client.CreateCluster(params) 47 | if err != nil { 48 | fmt.Fprintf(os.Stderr, "failed to create cluster: %v", err) 49 | os.Exit(1) 50 | } 51 | 52 | fmt.Printf("Starting to create cluster %s\n", response.ClusterId) 53 | }, 54 | } 55 | 56 | command.Flags().StringVarP(&file, "file", "f", "", "specify cluster creation parameters file") 57 | 58 | return command 59 | } 60 | -------------------------------------------------------------------------------- /cmd/delete.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "github.com/AlecAivazis/survey/v2" 6 | "github.com/jqlu/ackctl/client" 7 | "github.com/spf13/cobra" 8 | "log" 9 | ) 10 | 11 | func init() { 12 | deleteCmd.AddCommand(newDeleteClusterCmd()) 13 | deleteCmd.AddCommand(newDeleteNodeCmd()) 14 | rootCmd.AddCommand(deleteCmd) 15 | } 16 | 17 | var deleteCmd = &cobra.Command{ 18 | Use: "delete", 19 | Short: "Delete resources", 20 | Long: ``, 21 | Run: func(cmd *cobra.Command, args []string) { 22 | 23 | }, 24 | } 25 | 26 | func newDeleteClusterCmd() *cobra.Command { 27 | command := &cobra.Command{ 28 | Use: "cluster", 29 | Short: "Delete a cluster", 30 | Long: ``, 31 | Run: func(cmd *cobra.Command, args []string) { 32 | cluster, err := client.FindClusterByPrefix(args[0]) 33 | if err != nil { 34 | log.Fatalf("Unable to find cluster: %v", err) 35 | } 36 | 37 | confirm := false 38 | prompt := &survey.Confirm{ 39 | Message: fmt.Sprintf("Are you sure to delete cluster %s(%s)? Cluster cannot be restored after deletion", 40 | cluster.Name, cluster.ClusterID), 41 | Default: false, 42 | } 43 | _ = survey.AskOne(prompt, &confirm) 44 | 45 | if !confirm { 46 | return 47 | } 48 | 49 | csClient := client.GetCsClient() 50 | if err := csClient.DeleteKubernetesCluster(cluster.ClusterID); err != nil { 51 | log.Fatalf("Failed to delete cluster %s(%s): %v", cluster.Name, cluster.ClusterID, err) 52 | } 53 | 54 | fmt.Printf("Starting to delete cluster %s(%s)\n", cluster.Name, cluster.ClusterID) 55 | }, 56 | } 57 | 58 | return command 59 | } 60 | 61 | func newDeleteNodeCmd() *cobra.Command { 62 | var ( 63 | clusterId string 64 | drain bool 65 | release bool 66 | ) 67 | 68 | command := &cobra.Command{ 69 | Use: "node", 70 | Short: "Delete a node", 71 | Long: ``, 72 | Run: func(cmd *cobra.Command, args []string) { 73 | if len(args) < 1 { 74 | log.Fatalf("Missing node name") 75 | } 76 | 77 | nodeName := args[0] 78 | if err := client.RemoveNode(clusterId, nodeName, release, drain); err != nil { 79 | log.Fatalf("Failed to delete node %s of cluster %s:%v", nodeName, clusterId, err) 80 | } 81 | 82 | fmt.Printf("Staring to delete node %s of cluster %s\n", nodeName, clusterId) 83 | }, 84 | } 85 | 86 | command.Flags().StringVarP(&clusterId, "cluster-id", "c", "", "specify cluster id") 87 | command.Flags().BoolVar(&drain, "drain", false, "whether to drain the node before deletion") 88 | command.Flags().BoolVar(&release, "release", false, "whether to release the ECS instance after deletion") 89 | 90 | return command 91 | } 92 | -------------------------------------------------------------------------------- /cmd/get.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "github.com/jqlu/ackctl/client" 6 | "github.com/spf13/cobra" 7 | "html/template" 8 | "log" 9 | "os" 10 | "text/tabwriter" 11 | ) 12 | 13 | func init() { 14 | getCmd.AddCommand(newGetClusterCmd()) 15 | getCmd.AddCommand(newGetNodePoolCmd()) 16 | getCmd.AddCommand(newGetNodeCmd()) 17 | rootCmd.AddCommand(getCmd) 18 | } 19 | 20 | const clusterDetailFormat = `Cluster: 21 | Name: {{.Name}} 22 | Id: {{.ClusterID}} 23 | State: {{.State}} 24 | Region: {{.RegionID}} 25 | Created At: {{.Created}} 26 | ` 27 | 28 | var clusterDetailTpl = template.Must(template.New("cluster_detail").Parse(clusterDetailFormat)) 29 | 30 | var getCmd = &cobra.Command{ 31 | Use: "get", 32 | Short: "Get resource(s)", 33 | Long: ``, 34 | Run: func(cmd *cobra.Command, args []string) { 35 | 36 | }, 37 | } 38 | 39 | func newGetClusterCmd() *cobra.Command { 40 | command := &cobra.Command{ 41 | Use: "cluster", 42 | Short: "Get cluster(s)", 43 | Long: ``, 44 | Run: func(cmd *cobra.Command, args []string) { 45 | csClient := client.GetCsClient() 46 | 47 | if len(args) == 0 { 48 | clusters, err := csClient.DescribeClusters("") 49 | if err != nil { 50 | panic(err) 51 | } 52 | 53 | w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0) 54 | fmt.Fprintln(w, "ID\tState\tRegion\tType\tName") 55 | for _, c := range clusters { 56 | fmt.Fprintf(w, "%s\t%v\t%v\t%v\t%v\n", c.ClusterID, c.State, c.RegionID, c.ClusterType, c.Name) 57 | } 58 | w.Flush() 59 | return 60 | } 61 | 62 | cluster, err := client.FindClusterByPrefix(args[0]) 63 | if err != nil { 64 | log.Fatalf("Unable to find cluster: %v", err) 65 | } 66 | 67 | _ = clusterDetailTpl.Execute(os.Stdout, cluster) 68 | }, 69 | } 70 | 71 | return command 72 | } 73 | 74 | func newGetNodePoolCmd() *cobra.Command { 75 | var ( 76 | clusterId string 77 | ) 78 | command := &cobra.Command{ 79 | Use: "nodepool", 80 | Short: "Get node pool(s) of a cluster", 81 | Long: ``, 82 | Run: func(cmd *cobra.Command, args []string) { 83 | nodepools, err := client.ListNodePools(clusterId) 84 | if err != nil { 85 | log.Fatalf("failed to list node pools for cluster %s: %v", clusterId, err) 86 | } 87 | 88 | w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0) 89 | fmt.Fprintln(w, "Name\tId\tState\tTotal\tServing\tOffline") 90 | for _, n := range nodepools { 91 | fmt.Fprintf(w, "%s\t%v\t%v\t%v\t%v\t%v\n", n.Name, n.NodePoolId, n.State, n.TotalNodes, n.ServingNodes, n.OfflineNodes) 92 | } 93 | w.Flush() 94 | }, 95 | } 96 | 97 | command.Flags().StringVarP(&clusterId, "cluster-id", "c", "", "specify cluster id") 98 | 99 | return command 100 | } 101 | 102 | func newGetNodeCmd() *cobra.Command { 103 | var ( 104 | clusterId string 105 | nodePoolId string 106 | ) 107 | command := &cobra.Command{ 108 | Use: "node", 109 | Short: "List nodes of a node pool", 110 | Long: ``, 111 | Run: func(cmd *cobra.Command, args []string) { 112 | nodes, err := client.ListNodes(clusterId, nodePoolId) 113 | if err != nil { 114 | log.Fatalf("failed to list nodes in node pool %s for cluster %s: %v", nodePoolId, clusterId, err) 115 | } 116 | 117 | w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0) 118 | fmt.Fprintln(w, "Instance Id\tNode Name\tInstance Status\tRole\tInstance Type\tNode Status") 119 | for _, n := range nodes { 120 | fmt.Fprintf(w, "%s\t%v\t%v\t%v\t%v\t%v\n", n.InstanceId, n.NodeName, n.NodeStatus, n.InstanceRole, n.InstanceType, n.State) 121 | } 122 | w.Flush() 123 | }, 124 | } 125 | 126 | command.Flags().StringVarP(&clusterId, "cluster-id", "c", "", "specify cluster id") 127 | command.Flags().StringVarP(&nodePoolId, "node-pool-id", "p", "", "specify node pool id") 128 | 129 | return command 130 | } 131 | -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "github.com/spf13/cobra" 6 | "os" 7 | ) 8 | 9 | var rootCmd = &cobra.Command{ 10 | Use: "ackctl", 11 | Short: "ackctl is a CLI management tool for ACK(Alibaba Cloud Container Service for Kubernetes)", 12 | Long: ``, 13 | Run: func(cmd *cobra.Command, args []string) { 14 | 15 | }, 16 | } 17 | 18 | func Execute() { 19 | if err := rootCmd.Execute(); err != nil { 20 | fmt.Println(err.Error()) 21 | os.Exit(1) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /cmd/scale.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "github.com/jqlu/ackctl/client" 6 | "github.com/spf13/cobra" 7 | "log" 8 | ) 9 | 10 | func init() { 11 | scaleCmd.AddCommand(newScaleNodePoolCmd()) 12 | rootCmd.AddCommand(scaleCmd) 13 | } 14 | 15 | var scaleCmd = &cobra.Command{ 16 | Use: "scale", 17 | Short: "Scale resource(s)", 18 | Long: ``, 19 | Run: func(cmd *cobra.Command, args []string) { 20 | 21 | }, 22 | } 23 | 24 | func newScaleNodePoolCmd() *cobra.Command { 25 | var ( 26 | clusterId string 27 | increment int 28 | ) 29 | 30 | command := &cobra.Command{ 31 | Use: "nodepool", 32 | Short: "Scale a node pool", 33 | Long: ``, 34 | Run: func(cmd *cobra.Command, args []string) { 35 | if len(args) < 1 { 36 | log.Fatalf("Missing node pool id") 37 | } 38 | 39 | nodePoolId := args[0] 40 | if err := client.ScaleNodePool(clusterId, nodePoolId, increment); err != nil { 41 | log.Fatalf("Failed to scale node pool %s of cluster %s:%v", nodePoolId, clusterId, err) 42 | } 43 | 44 | fmt.Printf("Staring to scale node pool %s of cluster %s\n", nodePoolId, clusterId) 45 | }, 46 | } 47 | 48 | command.Flags().StringVarP(&clusterId, "cluster-id", "c", "", "specify cluster id") 49 | command.Flags().IntVar(&increment, "increment", 0, "increment of node(s)") 50 | 51 | return command 52 | } 53 | -------------------------------------------------------------------------------- /cmd/use.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "github.com/AlecAivazis/survey/v2" 7 | "github.com/denverdino/aliyungo/cs" 8 | "github.com/jqlu/ackctl/client" 9 | "github.com/spf13/cobra" 10 | "io/ioutil" 11 | "log" 12 | "os" 13 | "path/filepath" 14 | ) 15 | 16 | func init() { 17 | useCmd.AddCommand(newUseClusterCmd()) 18 | rootCmd.AddCommand(useCmd) 19 | } 20 | 21 | var useCmd = &cobra.Command{ 22 | Use: "use", 23 | Short: "Configure kubeconfig for cluster(s)", 24 | Long: ``, 25 | Run: func(cmd *cobra.Command, args []string) { 26 | 27 | }, 28 | } 29 | 30 | func newUseClusterCmd() *cobra.Command { 31 | var ( 32 | useAll bool 33 | ) 34 | 35 | var command = &cobra.Command{ 36 | Use: "cluster", 37 | Short: "Configure kubeconfig for cluster(s)", 38 | Long: ``, 39 | Args: cobra.MaximumNArgs(1), 40 | RunE: func(cmd *cobra.Command, args []string) error { 41 | clusters := make([]*cs.ClusterType, 0) 42 | if useAll { 43 | cl, err := client.GetAccessibleClusters() 44 | if err != nil { 45 | log.Fatalf("Failed to list accessible clusters: %v", err) 46 | } 47 | clusters = cl 48 | } else { 49 | cluster, err := client.FindClusterByPrefix(args[0]) 50 | if err != nil { 51 | log.Fatalf("Unable to find cluster: %v", err) 52 | } 53 | clusters = append(clusters, cluster) 54 | } 55 | 56 | cb, err := client.GetMergedKubeConfig(clusters) 57 | if err != nil { 58 | log.Fatalf("Failed to get kubeConfig: %v", err) 59 | } 60 | 61 | userHome, err := os.UserHomeDir() 62 | if err != nil { 63 | return errors.New("failed to get user home") 64 | } 65 | configPath := filepath.Join(userHome, ".kube", "config") 66 | 67 | _, err = os.Stat(configPath) 68 | confirm := true 69 | if !os.IsNotExist(err) { 70 | prompt := &survey.Confirm{ 71 | Message: fmt.Sprintf("Config %v exists, overwrite?", configPath), 72 | Default: true, 73 | } 74 | _ = survey.AskOne(prompt, &confirm) 75 | } 76 | 77 | if !confirm { 78 | return nil 79 | } 80 | 81 | err = ioutil.WriteFile(configPath, cb, 440) 82 | if err != nil { 83 | log.Fatalf("failed to write kubeConfig to file") 84 | } 85 | 86 | if useAll { 87 | fmt.Printf("Merged kubeConfigs of %v clusters into: %v.\n", len(clusters), configPath) 88 | fmt.Printf("Use 'kubectl config get-contexts' to list contexts.\n") 89 | fmt.Printf("Use 'kubectl config use-context' to select context.\n") 90 | } else { 91 | fmt.Printf("%v updated to use cluster\n", configPath) 92 | } 93 | 94 | return nil 95 | }, 96 | } 97 | 98 | command.Flags().BoolVar(&useAll, "all", false, "get kubeconfig of all clusters and merge into one file") 99 | return command 100 | } 101 | -------------------------------------------------------------------------------- /config/config.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "io/ioutil" 7 | "log" 8 | "os" 9 | "path/filepath" 10 | ) 11 | 12 | const ( 13 | configDir = ".ackctl" 14 | configFile = "config.json" 15 | ) 16 | 17 | type aliyunCliConfig struct { 18 | Current string `json:"current"` 19 | Profiles []aliyunCliProfile `json:"profiles"` 20 | } 21 | 22 | type aliyunCliProfile struct { 23 | Name string `json:"name"` 24 | Mode string `json:"mode"` 25 | AccessKeyId string `json:"access_key_id"` 26 | AccessKeySecret string `json:"access_key_secret"` 27 | } 28 | 29 | type AkConfig struct { 30 | AccessKeyId string 31 | AccessKeySecret string 32 | } 33 | 34 | func MustLoadConfig() *AkConfig { 35 | c, err := loadOwnConfig() 36 | if err != nil { 37 | c, err = loadAliyunCliConfig() 38 | if err != nil { 39 | log.Fatal("No config available. Try 'ackctl configure'.") 40 | } 41 | fmt.Println("Using config from Aliyun CLI.") 42 | } else { 43 | fmt.Println("Using config for ackctl") 44 | } 45 | 46 | return &AkConfig{ 47 | AccessKeyId: c.AccessKeyId, 48 | AccessKeySecret: c.AccessKeySecret, 49 | } 50 | } 51 | 52 | func loadAliyunCliConfig() (*aliyunCliProfile, error) { 53 | path := getAliyunCLIConfigFilePath() 54 | 55 | f, err := ioutil.ReadFile(path) 56 | if err != nil { 57 | return nil, err 58 | } 59 | 60 | config := aliyunCliConfig{} 61 | err = json.Unmarshal(f, &config) 62 | if err != nil { 63 | return nil, err 64 | } 65 | 66 | for _, profile := range config.Profiles { 67 | if profile.Mode == "AK" && config.Current == profile.Name { 68 | return &profile, nil 69 | } 70 | } 71 | 72 | return nil, fmt.Errorf("no access key found in Aliyun CLI config") 73 | } 74 | 75 | func getAliyunCLIConfigFilePath() string { 76 | homeDir, err := os.UserHomeDir() 77 | if err != nil { 78 | log.Fatalf("Error to get user home dir: %v", err) 79 | } 80 | return filepath.Join(homeDir, ".aliyun/config.json") 81 | } 82 | 83 | func getConfigDir() string { 84 | homeDir, err := os.UserHomeDir() 85 | if err != nil { 86 | log.Fatalf("Error to get user home dir: %v", err) 87 | } 88 | return filepath.Join(homeDir, configDir) 89 | } 90 | 91 | func getConfigFilePath() string { 92 | return filepath.Join(getConfigDir(), configFile) 93 | } 94 | 95 | func ensureConfigFile() { 96 | path := getConfigFilePath() 97 | _, err := os.Stat(path) 98 | if err != nil { 99 | if os.IsNotExist(err) { 100 | if err := os.MkdirAll(getConfigDir(), 0755); err != nil { 101 | log.Fatal(err) 102 | } 103 | 104 | text, _ := json.Marshal(aliyunCliProfile{}) 105 | if err := ioutil.WriteFile(getConfigFilePath(), text, 0600); err != nil { 106 | log.Fatal(err) 107 | } 108 | 109 | return 110 | } else { 111 | log.Fatal(err) 112 | } 113 | } 114 | } 115 | 116 | func loadOwnConfig() (*aliyunCliProfile, error) { 117 | t, err := ioutil.ReadFile(getConfigFilePath()) 118 | if err != nil { 119 | return nil, fmt.Errorf("failed to read config file: %w", err) 120 | } 121 | 122 | var c aliyunCliProfile 123 | if err := json.Unmarshal(t, &c); err != nil { 124 | return nil, fmt.Errorf("failed to parse config: %w", err) 125 | } 126 | 127 | return &c, nil 128 | } 129 | 130 | func UpdateConfigFile(input AkConfig) error { 131 | ensureConfigFile() 132 | 133 | var c *aliyunCliProfile 134 | c, err := loadOwnConfig() 135 | if err != nil { 136 | c = &aliyunCliProfile{} 137 | } 138 | 139 | c.AccessKeyId = input.AccessKeyId 140 | c.AccessKeySecret = input.AccessKeySecret 141 | 142 | t, _ := json.Marshal(c) 143 | if err := ioutil.WriteFile(getConfigFilePath(), t, 0600); err != nil { 144 | return fmt.Errorf("failed to write config file: %w", err) 145 | } 146 | 147 | return nil 148 | } 149 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jqlu/ackctl 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/AlecAivazis/survey/v2 v2.0.5 7 | github.com/aliyun/alibaba-cloud-sdk-go v1.61.330 8 | github.com/denverdino/aliyungo v0.0.0-20200710064824-52d8320f2b1c 9 | github.com/imdario/mergo v0.3.10 10 | github.com/spf13/cobra v1.0.0 11 | k8s.io/api v0.18.6 12 | k8s.io/client-go v0.18.6 13 | k8s.io/utils v0.0.0-20200716102541-988ee3149bb2 // indirect 14 | ) 15 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | github.com/AlecAivazis/survey/v2 v2.0.5 h1:xpZp+Q55wi5C7Iaze+40onHnEkex1jSc34CltJjOoPM= 5 | github.com/AlecAivazis/survey/v2 v2.0.5/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74= 6 | github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= 7 | github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= 8 | github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= 9 | github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= 10 | github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= 11 | github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 12 | github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= 13 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 14 | github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= 15 | github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= 16 | github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= 17 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 18 | github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= 19 | github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= 20 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 21 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 22 | github.com/aliyun/alibaba-cloud-sdk-go v1.61.330 h1:6gvhO75a5m4XNoLkdJskhmjs2HTe0nXDm280XRA2OSc= 23 | github.com/aliyun/alibaba-cloud-sdk-go v1.61.330/go.mod h1:pUKYbK5JQ+1Dfxk80P0qxGqe5dkxDoabbZS7zOcouyA= 24 | github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 25 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 26 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 27 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= 28 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 29 | github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= 30 | github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= 31 | github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 32 | github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= 33 | github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 34 | github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 35 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 36 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 37 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 38 | github.com/denverdino/aliyungo v0.0.0-20200710064824-52d8320f2b1c h1:mu8/VfrU80HCrKyUiyMkDRbkC0pkJaqQ3jAoN0YsPDA= 39 | github.com/denverdino/aliyungo v0.0.0-20200710064824-52d8320f2b1c/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= 40 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 41 | github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= 42 | github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= 43 | github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= 44 | github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= 45 | github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= 46 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 47 | github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 48 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 49 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 50 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 51 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 52 | github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= 53 | github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= 54 | github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= 55 | github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= 56 | github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= 57 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 58 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 59 | github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= 60 | github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= 61 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 62 | github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= 63 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 64 | github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 65 | github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 66 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 67 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 68 | github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 69 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 70 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 71 | github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= 72 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 73 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 74 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 75 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 76 | github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= 77 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 78 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 79 | github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= 80 | github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 81 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 82 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 83 | github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 84 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 85 | github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= 86 | github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= 87 | github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= 88 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 89 | github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 90 | github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= 91 | github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= 92 | github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= 93 | github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= 94 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 95 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 96 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 97 | github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ= 98 | github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= 99 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 100 | github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= 101 | github.com/imdario/mergo v0.3.10 h1:6q5mVkdH/vYmqngx7kZQTjJ5HRsx+ImorDIEQ+beJgc= 102 | github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= 103 | github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= 104 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 105 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= 106 | github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 107 | github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= 108 | github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 109 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 110 | github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= 111 | github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 112 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 113 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 114 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 115 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= 116 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= 117 | github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 118 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 119 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 120 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= 121 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 122 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 123 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= 124 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 125 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 126 | github.com/kr/pty v1.1.4 h1:5Myjjh3JY/NaAi4IsUbHADytDyl1VE1Y9PXDlL+P/VQ= 127 | github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 128 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 129 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 130 | github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= 131 | github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 132 | github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= 133 | github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 134 | github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= 135 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 136 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 137 | github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= 138 | github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= 139 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 140 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 141 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 142 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 143 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 144 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 145 | github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= 146 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 147 | github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 148 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 149 | github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= 150 | github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= 151 | github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 152 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 153 | github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 154 | github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 155 | github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 156 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 157 | github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 158 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 159 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 160 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 161 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 162 | github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= 163 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 164 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 165 | github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 166 | github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 167 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 168 | github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 169 | github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 170 | github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 171 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 172 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 173 | github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= 174 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 175 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 176 | github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 177 | github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= 178 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 179 | github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= 180 | github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= 181 | github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 182 | github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= 183 | github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= 184 | github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= 185 | github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 186 | github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= 187 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 188 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 189 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 190 | github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= 191 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 192 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 193 | github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 194 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 195 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 196 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 197 | github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= 198 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 199 | github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 200 | github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= 201 | github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= 202 | github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= 203 | go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= 204 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 205 | go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= 206 | go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= 207 | go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 208 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 209 | golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 210 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 211 | golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5 h1:8dUaAV7K4uHsF56JQWkprecIQKdPHtR9jCHF5nB8uzc= 212 | golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 213 | golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= 214 | golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 215 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 216 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 217 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 218 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 219 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 220 | golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 221 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 222 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 223 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 224 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 225 | golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 226 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 227 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 228 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 229 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 230 | golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 231 | golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= 232 | golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 233 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= 234 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 235 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 236 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= 237 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 238 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 239 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 240 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 241 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 242 | golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 243 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 244 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 245 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 246 | golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 247 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 248 | golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 249 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 250 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 251 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 252 | golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1 h1:R4dVlxdmKenVdMRS/tTspEpSTRWINYrHD8ySIU9yCIU= 253 | golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 254 | golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= 255 | golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 256 | golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 257 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 258 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 259 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 260 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 261 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 262 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= 263 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 264 | golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 265 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 266 | golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 267 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 268 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 269 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 270 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 271 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 272 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 273 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 274 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 275 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 276 | google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= 277 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 278 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 279 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 280 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 281 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 282 | google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 283 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 284 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 285 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= 286 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 287 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 288 | gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= 289 | gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 290 | gopkg.in/ini.v1 v1.42.0 h1:7N3gPTt50s8GuLortA00n8AqRTk75qOP98+mTPpgzRk= 291 | gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 292 | gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= 293 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 294 | gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= 295 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 296 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 297 | gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= 298 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 299 | gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= 300 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 301 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 302 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 303 | k8s.io/api v0.18.6 h1:osqrAXbOQjkKIWDTjrqxWQ3w0GkKb1KA1XkUGHHYpeE= 304 | k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= 305 | k8s.io/apimachinery v0.18.6 h1:RtFHnfGNfd1N0LeSrKCUznz5xtUP1elRGvHJbL3Ntag= 306 | k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= 307 | k8s.io/client-go v0.18.6 h1:I+oWqJbibLSGsZj8Xs8F0aWVXJVIoUHWaaJV3kUN/Zw= 308 | k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= 309 | k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= 310 | k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= 311 | k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= 312 | k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= 313 | k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= 314 | k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= 315 | k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= 316 | k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= 317 | k8s.io/utils v0.0.0-20200716102541-988ee3149bb2 h1:7B1N7E4u280VBkr5FDIPOQXwKlWZyCxSb8QJeZuXzac= 318 | k8s.io/utils v0.0.0-20200716102541-988ee3149bb2/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 319 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= 320 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= 321 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= 322 | sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= 323 | sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= 324 | sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= 325 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/jqlu/ackctl/cmd" 5 | ) 6 | 7 | func main() { 8 | cmd.Execute() 9 | } -------------------------------------------------------------------------------- /testdata/create.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test1", 3 | "cluster_type": "ManagedKubernetes", 4 | "disable_rollback": true, 5 | "timeout_mins": 60, 6 | "kubernetes_version": "1.16.9-aliyun.1", 7 | "region_id": "ap-southeast-1", 8 | "snat_entry": true, 9 | "cloud_monitor_flags": true, 10 | "endpoint_public_access": true, 11 | "deletion_protection": false, 12 | "node_cidr_mask": "26", 13 | "proxy_mode": "ipvs", 14 | "tags": [], 15 | "addons": [ 16 | { 17 | "name": "flannel" 18 | }, 19 | { 20 | "name": "csi-plugin" 21 | }, 22 | { 23 | "name": "csi-provisioner" 24 | }, 25 | { 26 | "name": "logtail-ds", 27 | "config": "{\"IngressDashboardEnabled\":\"false\"}" 28 | }, 29 | { 30 | "name": "ack-node-problem-detector", 31 | "config": "{\"sls_project_name\":\"\"}" 32 | }, 33 | { 34 | "name": "nginx-ingress-controller", 35 | "config": "{\"IngressSlbNetworkType\":\"internet\"}" 36 | }, 37 | { 38 | "name": "arms-prometheus" 39 | } 40 | ], 41 | "os_type": "Linux", 42 | "platform": "CentOS", 43 | "runtime": { 44 | "name": "docker", 45 | "version": "19.03.5" 46 | }, 47 | "worker_instance_types": [ 48 | "ecs.g5.large" 49 | ], 50 | "num_of_nodes": 2, 51 | "worker_system_disk_category": "cloud_efficiency", 52 | "worker_system_disk_size": 119, 53 | "worker_instance_charge_type": "PostPaid", 54 | "vpcid": "vpc-t4ne7qkpbbcgbns22pq8e", 55 | "container_cidr": "172.23.0.0/16", 56 | "service_cidr": "172.24.0.0/20", 57 | "vswitch_ids": [ 58 | "vsw-t4ntt2tn54x4b80xj2oir" 59 | ], 60 | "key_pair": "临时", 61 | "logging_type": "SLS", 62 | "cpu_policy": "none", 63 | "is_enterprise_security_group": true 64 | } --------------------------------------------------------------------------------