Skip to content

Commit

Permalink
Clean up tagging docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarp committed Sep 12, 2018
1 parent 58631ac commit 43a16b9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/eksctl/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down
2 changes: 1 addition & 1 deletion pkg/cfn/manager/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 43a16b9

Please sign in to comment.