mirror of https://github.com/kubernetes/kops.git
Replace * in IAM tags when IRSA namespace has wildcard
This commit is contained in:
parent
f3b3766cd0
commit
91d3e89313
|
@ -200,7 +200,7 @@ func (b *KopsModelContext) CloudTagsForInstanceGroup(ig *kops.InstanceGroup) (ma
|
|||
func (b *KopsModelContext) CloudTagsForServiceAccount(name string, sa types.NamespacedName) map[string]string {
|
||||
tags := b.CloudTags(name, false)
|
||||
tags[awstasks.CloudTagServiceAccountName] = sa.Name
|
||||
tags[awstasks.CloudTagServiceAccountNamespace] = sa.Namespace
|
||||
tags[awstasks.CloudTagServiceAccountNamespace] = strings.ReplaceAll(sa.Namespace, "*", "wildcard")
|
||||
return tags
|
||||
}
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ resource "aws_iam_role" "myserviceaccount-test-wildcard-sa-minimal-example-com"
|
|||
"Name" = "myserviceaccount.test-wildcard.sa.minimal.example.com"
|
||||
"kubernetes.io/cluster/minimal.example.com" = "owned"
|
||||
"service-account.kops.k8s.io/name" = "myserviceaccount"
|
||||
"service-account.kops.k8s.io/namespace" = "test-*"
|
||||
"service-account.kops.k8s.io/namespace" = "test-wildcard"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue