Apply cloud labels into ELB

Fixes #2048
This commit is contained in:
Thanabodee Charoenpiriyakij 2018-08-10 17:55:44 +07:00
parent b213de6c25
commit b52c945f9f
2 changed files with 5 additions and 0 deletions

View File

@ -228,6 +228,8 @@ resource "aws_elb" "api-complex-example-com" {
tags = {
KubernetesCluster = "complex.example.com"
Name = "api.complex.example.com"
Owner = "John Doe"
"foo/bar" = "fib+baz"
}
}

View File

@ -80,6 +80,9 @@ func BuildCloud(cluster *kops.Cluster) (fi.Cloud, error) {
}
cloudTags := map[string]string{awsup.TagClusterName: cluster.ObjectMeta.Name}
for k, v := range cluster.Spec.CloudLabels {
cloudTags[k] = v
}
awsCloud, err := awsup.NewAWSCloud(region, cloudTags)
if err != nil {