From cae68d77d8e872df83a99e8790618e8822cd4e60 Mon Sep 17 00:00:00 2001 From: JacieChao Date: Wed, 17 Mar 2021 16:01:02 +0800 Subject: [PATCH] docs(autok3s): update docs and flag descriptions for providers --- docs/i18n/en_us/alibaba/README.md | 2 ++ docs/i18n/en_us/aws/README.md | 2 +- docs/i18n/en_us/tencent/README.md | 2 +- docs/i18n/zh_cn/alibaba/README.md | 2 ++ docs/i18n/zh_cn/aws/README.md | 2 +- docs/i18n/zh_cn/tencent/README.md | 2 +- pkg/cluster/base.go | 18 +++++++++--------- pkg/providers/alibaba/flag.go | 22 +++++++++++----------- pkg/providers/aws/flag.go | 26 +++++++++++++------------- pkg/providers/tencent/flag.go | 24 ++++++++++++------------ pkg/types/tencent/tencent.go | 6 +++--- 11 files changed, 56 insertions(+), 52 deletions(-) diff --git a/docs/i18n/en_us/alibaba/README.md b/docs/i18n/en_us/alibaba/README.md index a6b75226..7d487f9e 100644 --- a/docs/i18n/en_us/alibaba/README.md +++ b/docs/i18n/en_us/alibaba/README.md @@ -350,6 +350,8 @@ autok3s -d create \ ### Enabling Alibaba Cloud Controller Manager(CCM) +Please check [here](https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/docs/getting-started.md) for more information about Aliyun Cloud Provider. + ```bash autok3s -d create \ ... \ diff --git a/docs/i18n/en_us/aws/README.md b/docs/i18n/en_us/aws/README.md index 2147e171..ef5ebde0 100644 --- a/docs/i18n/en_us/aws/README.md +++ b/docs/i18n/en_us/aws/README.md @@ -268,7 +268,7 @@ autok3s -d create \ ### Enabling AWS Cloud Controller Manager(CCM) -Please check [this](https://kubernetes.github.io/cloud-provider-aws/prerequisites.html) to prepare IAM policies as prerequisites. +Please check [this](https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md) to prepare IAM policies as prerequisites. ```bash autok3s -d create -p aws \ diff --git a/docs/i18n/en_us/tencent/README.md b/docs/i18n/en_us/tencent/README.md index 619633e4..b7bf21ae 100644 --- a/docs/i18n/en_us/tencent/README.md +++ b/docs/i18n/en_us/tencent/README.md @@ -293,7 +293,7 @@ autok3s -d create -p tencent --name myk3s --master 3 --registry /etc/autok3s/reg ### Enable Tencent Cloud Controller Manager -You should create cluster route table if enabled CCM, and set `--router` with you router table name. +You should create cluster route table if enabled [CCM](https://github.com/TencentCloud/tencentcloud-cloud-controller-manager/blob/master/docs/getting-started.md), and set `--router` with you router table name. Autok3s uses `10.42.0.0/16` as default cluster CIDR, your route table should set the same cidr-block. diff --git a/docs/i18n/zh_cn/alibaba/README.md b/docs/i18n/zh_cn/alibaba/README.md index 2d9df760..7d29740b 100644 --- a/docs/i18n/zh_cn/alibaba/README.md +++ b/docs/i18n/zh_cn/alibaba/README.md @@ -350,6 +350,8 @@ autok3s -d create \ ### 启用阿里云 CCM(Cloud Controller Manager) +更多关于Aliyun Cloud Provider信息,请点击[这里](https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/docs/getting-started.md)查看 + ```bash autok3s -d create \ ... \ diff --git a/docs/i18n/zh_cn/aws/README.md b/docs/i18n/zh_cn/aws/README.md index 21ce87c6..93a87823 100644 --- a/docs/i18n/zh_cn/aws/README.md +++ b/docs/i18n/zh_cn/aws/README.md @@ -266,7 +266,7 @@ configs: ### 启用 AWS CCM(Cloud Controller Manager) -如果您要使用 AWS CCM 功能需要提前准备好两个 IAM policies,以保证 CCM 功能的正常使用,具体内容请参考[这里](https://kubernetes.github.io/cloud-provider-aws/prerequisites.html) +如果您要使用 AWS CCM 功能需要提前准备好两个 IAM policies,以保证 CCM 功能的正常使用,具体内容请参考[这里](https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md) ```bash autok3s -d create -p aws \ diff --git a/docs/i18n/zh_cn/tencent/README.md b/docs/i18n/zh_cn/tencent/README.md index 6e73f89f..32181a5d 100644 --- a/docs/i18n/zh_cn/tencent/README.md +++ b/docs/i18n/zh_cn/tencent/README.md @@ -297,7 +297,7 @@ configs: ### 启用腾讯云 CCM(Cloud Controller Manager) -如果启用 CCM,您需要提前创建好集群路由表,以便 POD 可以通过 VPC 正常通信,并将路由表的名称通过`--router`参数传入。 +如果启用 [CCM](https://github.com/TencentCloud/tencentcloud-cloud-controller-manager/blob/master/docs/getting-started.md),您需要提前创建好集群路由表,以便 POD 可以通过 VPC 正常通信,并将路由表的名称通过`--router`参数传入。 autok3s 默认使用的 cluster cidr 为`10.42.0.0/16`,您需要为该网段创建路由表。 diff --git a/pkg/cluster/base.go b/pkg/cluster/base.go index a0df6a31..fc6914d4 100644 --- a/pkg/cluster/base.go +++ b/pkg/cluster/base.go @@ -69,13 +69,13 @@ func (p *ProviderBase) GetCreateOptions() []types.Flag { Name: "ui", P: &p.UI, V: p.UI, - Usage: "Enable K3s UI.", + Usage: "Enable K3s UI(kubernetes/dashboard). For how to login to UI, please see: https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md", }, { Name: "cluster", P: &p.Cluster, V: p.Cluster, - Usage: "Form k3s cluster using embedded etcd (requires K8s >= 1.19)", + Usage: "Form k3s cluster using embedded etcd (requires K8s >= 1.19), see: https://rancher.com/docs/k3s/latest/en/installation/ha-embedded/", }, } } @@ -94,7 +94,7 @@ func (p *ProviderBase) GetClusterOptions() []types.Flag { Name: "ip", P: &p.IP, V: p.IP, - Usage: "Public IP of an existing k3s server", + Usage: "IP for an existing k3s server", }, { Name: "k3s-version", @@ -106,25 +106,25 @@ func (p *ProviderBase) GetClusterOptions() []types.Flag { Name: "k3s-channel", P: &p.K3sChannel, V: p.K3sChannel, - Usage: "Used to specify the release channel of k3s. e.g.(stable, latest, or i.e. v1.18)", + Usage: "Channel to use for fetching K3s download URL. Defaults to “stable”. Options include: stable, latest, testing", }, { Name: "k3s-install-script", P: &p.InstallScript, V: p.InstallScript, - Usage: "Change the default upstream k3s install script address", + Usage: "Change the default upstream k3s install script address, see: https://rancher.com/docs/k3s/latest/en/installation/install-options/#options-for-installation-with-script", }, { Name: "master-extra-args", P: &p.MasterExtraArgs, V: p.MasterExtraArgs, - Usage: "Master extra arguments for k3s installer, wrapped in quotes. e.g.(--master-extra-args '--no-deploy metrics-server')", + Usage: "Master extra arguments for k3s installer, wrapped in quotes. e.g.(--master-extra-args '--no-deploy metrics-server'), for more information, please see: https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/", }, { Name: "worker-extra-args", P: &p.WorkerExtraArgs, V: p.WorkerExtraArgs, - Usage: "Worker extra arguments for k3s installer, wrapped in quotes. e.g.(--worker-extra-args '--node-taint key=value:NoExecute')", + Usage: "Worker extra arguments for k3s installer, wrapped in quotes. e.g.(--worker-extra-args '--node-taint key=value:NoExecute'), for more information, please see: https://rancher.com/docs/k3s/latest/en/installation/install-options/agent-config/", }, { Name: "registry", @@ -136,13 +136,13 @@ func (p *ProviderBase) GetClusterOptions() []types.Flag { Name: "datastore", P: &p.DataStore, V: p.DataStore, - Usage: "K3s datastore, HA mode `create/join` master node needed this flag", + Usage: "K3s datastore endpoint, Specify etcd, Mysql, Postgres, or Sqlite (default) data source name, see: https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#database", }, { Name: "token", P: &p.Token, V: p.Token, - Usage: "K3s master token, if empty will automatically generated", + Usage: "K3s token, if empty will automatically generated, see: https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/#cluster-options", }, { Name: "master", diff --git a/pkg/providers/alibaba/flag.go b/pkg/providers/alibaba/flag.go index 012a8958..9d34253f 100644 --- a/pkg/providers/alibaba/flag.go +++ b/pkg/providers/alibaba/flag.go @@ -63,7 +63,7 @@ func (p *Alibaba) GetCreateFlags() []types.Flag { Name: "terway", P: &p.Terway.Mode, V: p.Terway.Mode, - Usage: "Enable terway CNI plugin, currently only support ENI mode. i.e.(--terway eni)", + Usage: "Enable terway CNI plugin, currently only support ENI mode. i.e.(--terway eni), see: https://github.com/AliyunContainerService/terway/blob/v1.0.10/docs/usage.md", }, { Name: "terway-max-pool-size", @@ -207,35 +207,35 @@ func (p *Alibaba) sharedFlags() []types.Flag { Name: "key-pair", P: &p.KeyPair, V: p.KeyPair, - Usage: "Used to connect to an instance", + Usage: "Used to connect to an instance, see: https://help.aliyun.com/document_detail/51792.html?spm=a2c4g.11186623.6.947.50d950c5Mr0XWg", EnvVar: "ECS_SSH_KEYPAIR", }, { Name: "image", P: &p.Image, V: p.Image, - Usage: "Specify the image to be used by the instance", + Usage: "Specify the image to be used by the instance, see: https://help.aliyun.com/document_detail/25389.html?spm=a2c4g.11186623.6.764.5e063ebbsJtMNf", EnvVar: "ECS_IMAGE_ID", }, { Name: "instance-type", P: &p.InstanceType, V: p.InstanceType, - Usage: "Specify the type of VM instance", + Usage: "Specify the type of VM instance, see: https://help.aliyun.com/document_detail/25378.html?spm=a2c4g.11186623.6.605.455c6da7QzI8xc", EnvVar: "ECS_INSTANCE_TYPE", }, { Name: "v-switch", P: &p.VSwitch, V: p.VSwitch, - Usage: "Specify the vSwitch to be used by the instance", + Usage: "Specify the vSwitch to be used by the instance, see: https://help.aliyun.com/document_detail/100380.html?spm=a2c4g.11186623.6.563.733b103bRTApHj", EnvVar: "ECS_VSWITCH_ID", }, { Name: "disk-category", P: &p.DiskCategory, V: p.DiskCategory, - Usage: "Specify the system disk category used by the instance", + Usage: "Specify the system disk category used by the instance, see: https://help.aliyun.com/document_detail/25383.htm?spm=a2c4g.11186623.2.8.24382763SzqaxO#concept-n1s-rzb-wdb", EnvVar: "ECS_DISK_CATEGORY", }, { @@ -249,32 +249,32 @@ func (p *Alibaba) sharedFlags() []types.Flag { Name: "security-group", P: &p.SecurityGroup, V: p.SecurityGroup, - Usage: "Specify the security group used by the instance", + Usage: "Specify the security group used by the instance, see: https://help.aliyun.com/document_detail/25387.html?spm=a2c4g.11186623.6.922.1f8d6c01V9Md8g", EnvVar: "ECS_SECURITY_GROUP", }, { Name: "internet-max-bandwidth-out", P: &p.InternetMaxBandwidthOut, V: p.InternetMaxBandwidthOut, - Usage: "Specify the maximum out flow of the instance internet", + Usage: "Specify the maximum out flow of the instance internet, see: https://help.aliyun.com/document_detail/25412.htm?spm=a2c4g.11186623.2.8.21f4bb57lQgHgE#BandwidthQuota1", }, { Name: "eip", P: &p.EIP, V: p.EIP, - Usage: "Allocate EIP for instance", + Usage: "Allocate EIP for instance, see: https://help.aliyun.com/document_detail/113775.html?spm=a2c4g.11186623.6.974.39323647OLWuwe", }, { Name: "tags", P: &p.Tags, V: p.Tags, - Usage: "Set instance additional tags, i.e.(--tags a=b,b=c)", + Usage: "Set instance additional tags, i.e.(--tags a=b,b=c), see: https://help.aliyun.com/document_detail/25477.html?spm=a2c4g.11186623.6.1053.5fb621c6ENd1Hp", }, { Name: "cloud-controller-manager", P: &p.CloudControllerManager, V: p.CloudControllerManager, - Usage: "Enable cloud-controller-manager component", + Usage: "Enable cloud-controller-manager component, for more information, please check https://github.com/kubernetes/cloud-provider-alibaba-cloud/blob/master/docs/getting-started.md", }, } diff --git a/pkg/providers/aws/flag.go b/pkg/providers/aws/flag.go index dc237336..7c4d4bd1 100644 --- a/pkg/providers/aws/flag.go +++ b/pkg/providers/aws/flag.go @@ -194,42 +194,42 @@ func (p *Amazon) sharedFlags() []types.Flag { Name: "keypair-name", P: &p.KeypairName, V: p.KeypairName, - Usage: "AWS keypair to use connect to instance", + Usage: "AWS keypair to use connect to instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html", EnvVar: "AWS_KEYPAIR_NAME", }, { Name: "ami", P: &p.AMI, V: p.AMI, - Usage: "Used to specify the image to be used by the instance", + Usage: "Used to specify the image to be used by the instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html", EnvVar: "AWS_AMI", }, { Name: "instance-type", P: &p.InstanceType, V: p.InstanceType, - Usage: "Specify the type of VM instance", + Usage: "Specify the type of VM instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html", EnvVar: "AWS_INSTANCE_TYPE", }, { Name: "vpc-id", P: &p.VpcID, V: p.VpcID, - Usage: "AWS VPC id", + Usage: "AWS VPC id, using default vpc by default. see: https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html", EnvVar: "AWS_VPC_ID", }, { Name: "subnet-id", P: &p.SubnetID, V: p.SubnetID, - Usage: "AWS VPC subnet id", + Usage: "AWS VPC subnet id, see: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html", EnvVar: "AWS_SUBNET_ID", }, { Name: "volume-type", P: &p.VolumeType, V: p.VolumeType, - Usage: "Specify the EBS volume type", + Usage: "Specify the EBS volume type for root storage, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html", EnvVar: "AWS_VOLUME_TYPE", }, { @@ -243,44 +243,44 @@ func (p *Amazon) sharedFlags() []types.Flag { Name: "security-group", P: &p.SecurityGroup, V: p.SecurityGroup, - Usage: "Specify the security group used by the instance", + Usage: "Specify the security group used by the instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-security-groups.html", EnvVar: "AWS_SECURITY_GROUP", }, { Name: "iam-instance-profile-control", P: &p.IamInstanceProfileForControl, V: p.IamInstanceProfileForControl, - Usage: "AWS IAM Instance Profile for k3s control nodes to deploy AWS Cloud Provider, must set with --cloud-controller-manager", + Usage: "AWS IAM Instance Profile for k3s control nodes to deploy AWS Cloud Provider, must set with --cloud-controller-manager, see: https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md", }, { Name: "iam-instance-profile-worker", P: &p.IamInstanceProfileForWorker, V: p.IamInstanceProfileForWorker, - Usage: "AWS IAM Instance Profile for k3s worker nodes, must set with --cloud-controller-manager", + Usage: "AWS IAM Instance Profile for k3s worker nodes, must set with --cloud-controller-manager, see: https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/prerequisites.md", }, { Name: "request-spot-instance", P: &p.RequestSpotInstance, V: p.RequestSpotInstance, - Usage: "Request for spot instance", + Usage: "Request for spot instance, see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html?icmpid=docs_ec2_console", }, { Name: "spot-price", P: &p.SpotPrice, V: p.SpotPrice, - Usage: "Spot instance bid price (in dollar)", + Usage: "Spot instance bid price (in dollar), see: https://aws.amazon.com/ec2/spot/pricing/", }, { Name: "tags", P: &p.Tags, V: p.Tags, - Usage: "Set instance additional tags, i.e.(--tags a=b,b=c)", + Usage: "Set instance additional tags, i.e.(--tags a=b,b=c), see: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html", }, { Name: "cloud-controller-manager", P: &p.CloudControllerManager, V: p.CloudControllerManager, - Usage: "Enable cloud-controller-manager component", + Usage: "Enable cloud-controller-manager component, for more information, please check https://github.com/kubernetes/cloud-provider-aws/blob/master/docs/getting_started.md", }, } } diff --git a/pkg/providers/tencent/flag.go b/pkg/providers/tencent/flag.go index acaaff3e..4b0f33d9 100644 --- a/pkg/providers/tencent/flag.go +++ b/pkg/providers/tencent/flag.go @@ -193,41 +193,41 @@ func (p *Tencent) sharedFlags() []types.Flag { Name: "vpc", P: &p.VpcID, V: p.VpcID, - Usage: "Private network id", + Usage: "Private network id, see: https://cloud.tencent.com/document/product/215/20046", EnvVar: "CVM_VPC_ID", }, { Name: "subnet", P: &p.SubnetID, V: p.SubnetID, - Usage: "Private network subnet id", + Usage: "Private network subnet id, see: https://cloud.tencent.com/document/product/215/20046#.E5.AD.90.E7.BD.91", EnvVar: "CVM_SUBNET_ID", }, { Name: "keypair-id", P: &p.KeypairID, V: p.KeypairID, - Usage: "Used to connect to an instance", + Usage: "Used to connect to an instance, see: https://cloud.tencent.com/document/product/213/6092", EnvVar: "CVM_SSH_KEYPAIR", }, { Name: "image", P: &p.ImageID, V: p.ImageID, - Usage: "Specify the image to be used by the instance", + Usage: "Specify the image to be used by the instance, see: https://cloud.tencent.com/document/product/213/4941", }, { Name: "instance-type", P: &p.InstanceType, V: p.InstanceType, - Usage: "Specify the type of VM instance", + Usage: "Specify the type of VM instance, see: https://cloud.tencent.com/document/product/213/11518", EnvVar: "CVM_INSTANCE_TYPE", }, { Name: "disk-category", P: &p.SystemDiskType, V: p.SystemDiskType, - Usage: "Specify the system disk category used by the instance", + Usage: "Specify the system disk category used by the instance, see: https://cloud.tencent.com/document/product/362/2353", EnvVar: "CVM_DISK_CATEGORY", }, { @@ -241,38 +241,38 @@ func (p *Tencent) sharedFlags() []types.Flag { Name: "security-group", P: &p.SecurityGroupIds, V: p.SecurityGroupIds, - Usage: "Specify the security group used by the instance", + Usage: "Specify the security group used by the instance, see: https://cloud.tencent.com/document/product/213/12452", EnvVar: "CVM_SECURITY_GROUP", }, { Name: "internet-max-bandwidth-out", P: &p.InternetMaxBandwidthOut, V: p.InternetMaxBandwidthOut, - Usage: "Specify the maximum out flow of the instance internet", + Usage: "Specify the maximum out flow of the instance internet, see: https://cloud.tencent.com/document/product/213/12523", }, { Name: "tags", P: &p.Tags, V: p.Tags, - Usage: "Set instance additional tags, i.e.(--tags a=b,b=c)", + Usage: "Set instance additional tags, i.e.(--tags a=b,b=c), see: https://cloud.tencent.com/document/product/213/17131", }, { Name: "router", P: &p.NetworkRouteTableName, V: p.NetworkRouteTableName, - Usage: "Network route table name for tencent cloud manager, must set with --cloud-controller-manager", + Usage: "Network route table name for tencent cloud manager, must set with --cloud-controller-manager, see: https://github.com/TencentCloud/tencentcloud-cloud-controller-manager/tree/master/route-ctl", }, { Name: "eip", P: &p.PublicIPAssignedEIP, V: p.PublicIPAssignedEIP, - Usage: "Enable eip", + Usage: "Enable eip, see: https://cloud.tencent.com/document/product/213/5733", }, { Name: "cloud-controller-manager", P: &p.CloudControllerManager, V: p.CloudControllerManager, - Usage: "Enable cloud-controller-manager component", + Usage: "Enable cloud-controller-manager component, for more information, please check https://github.com/TencentCloud/tencentcloud-cloud-controller-manager/blob/master/docs/getting-started.md", }, } diff --git a/pkg/types/tencent/tencent.go b/pkg/types/tencent/tencent.go index 1dfd1bd0..ee61286a 100644 --- a/pkg/types/tencent/tencent.go +++ b/pkg/types/tencent/tencent.go @@ -21,13 +21,13 @@ type Options struct { Region string `json:"region,omitempty" yaml:"region,omitempty"` Zone string `json:"zone,omitempty" yaml:"zone,omitempty"` EndpointURL string `json:"endpoint-url,omitempty" yaml:"endpoint-url,omitempty"` - SecurityGroupIds string `json:"security-group-ids,omitempty" yaml:"security-group-ids,omitempty"` + SecurityGroupIds string `json:"security-group,omitempty" yaml:"security-group,omitempty"` KeypairID string `json:"keypair-id,omitempty" yaml:"keypair-id,omitempty"` VpcID string `json:"vpc-id,omitempty" yaml:"vpc-id,omitempty"` SubnetID string `json:"subnet-id,omitempty" yaml:"subnet-id,omitempty"` - ImageID string `json:"image-id,omitempty" yaml:"image-id,omitempty"` + ImageID string `json:"image,omitempty" yaml:"image,omitempty"` InstanceType string `json:"instance-type,omitempty" yaml:"instance-type,omitempty"` - SystemDiskType string `json:"disk-type,omitempty" yaml:"disk-type,omitempty"` + SystemDiskType string `json:"disk-category,omitempty" yaml:"disk-category,omitempty"` SystemDiskSize string `json:"disk-size,omitempty" yaml:"disk-size,omitempty"` InternetMaxBandwidthOut string `json:"internet-max-bandwidth-out,omitempty" yaml:"internet-max-bandwidth-out,omitempty"` PublicIPAssignedEIP bool `json:"eip" yaml:"eip"`