From 43a16b9d9dd3b1845bc4a76e695e36016dc3800c Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 12 Sep 2018 09:39:11 -0400 Subject: [PATCH] Clean up tagging docs. h/t @richardcase --- README.md | 4 +++- cmd/eksctl/create.go | 2 +- pkg/cfn/manager/api.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 540c4dc9f3..54ac85e612 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,9 @@ To use a pre-existing EC2 key pair in `us-east-1` region, you can specify key pa eksctl create cluster --ssh-public-key=my_kubernetes_key --region=us-east-1 ``` -To add custom tags to each stack, you can specify tags: +To add custom tags for all resources, use `--tags`. Note that until +https://github.com/weaveworks/eksctl/issues/25 is resolved, tags will +apply to CloudFormation stacks but not EKS clusters. ``` eksctl create cluster --tags environment=staging --region=us-east-1 diff --git a/cmd/eksctl/create.go b/cmd/eksctl/create.go index 0ea364d8e9..8b09dec905 100644 --- a/cmd/eksctl/create.go +++ b/cmd/eksctl/create.go @@ -68,7 +68,7 @@ func createClusterCmd() *cobra.Command { fs.StringVarP(&cfg.Region, "region", "r", DEFAULT_EKS_REGION, "AWS region") fs.StringVarP(&cfg.Profile, "profile", "p", "", "AWS credentials profile to use (overrides the AWS_PROFILE environment variable)") - fs.StringToStringVarP(&cfg.Tags, "tags", "", map[string]string{}, "Custom tags") + fs.StringToStringVarP(&cfg.Tags, "tags", "", map[string]string{}, `A list of KV pairs used to tag the AWS resources (e.g. "Owner=John Doe,Team=Some Team")`) fs.StringVarP(&cfg.NodeType, "node-type", "t", DEFAULT_NODE_TYPE, "node instance type") fs.IntVarP(&cfg.Nodes, "nodes", "N", DEFAULT_NODE_COUNT, "total number of nodes (for a static ASG)") diff --git a/pkg/cfn/manager/api.go b/pkg/cfn/manager/api.go index cf6cc19e5f..2307a0a77c 100644 --- a/pkg/cfn/manager/api.go +++ b/pkg/cfn/manager/api.go @@ -40,7 +40,7 @@ func NewStackCollection(provider api.ClusterProvider, spec *api.ClusterConfig) * for key, value := range spec.Tags { tags = append(tags, newTag(key, value)) } - fmt.Println("TAGS", tags) + logger.Debug("tags = %#v", tags) return &StackCollection{ cfn: provider.CloudFormation(), spec: spec,