mirror of https://github.com/kubernetes/kops.git
Skip the iamPolicy.DNSZone task when using gossip
This commit is contained in:
parent
a5fc8895dc
commit
c1e0991153
|
@ -22,6 +22,7 @@ import (
|
||||||
|
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"k8s.io/kops/pkg/apis/kops"
|
"k8s.io/kops/pkg/apis/kops"
|
||||||
|
"k8s.io/kops/pkg/dns"
|
||||||
"k8s.io/kops/pkg/model/iam"
|
"k8s.io/kops/pkg/model/iam"
|
||||||
"k8s.io/kops/pkg/util/stringorslice"
|
"k8s.io/kops/pkg/util/stringorslice"
|
||||||
"k8s.io/kops/upup/pkg/fi"
|
"k8s.io/kops/upup/pkg/fi"
|
||||||
|
@ -164,11 +165,13 @@ func (b *IAMModelBuilder) buildIAMRolePolicy(role iam.Subject, iamName string, i
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is slightly tricky; we need to know the hosted zone id,
|
if !dns.IsGossipHostname(b.Cluster.ObjectMeta.Name) {
|
||||||
// but we might be creating the hosted zone dynamically.
|
// This is slightly tricky; we need to know the hosted zone id,
|
||||||
// We create a stub-reference which will be combined by the execution engine.
|
// but we might be creating the hosted zone dynamically.
|
||||||
iamPolicy.DNSZone = &awstasks.DNSZone{
|
// We create a stub-reference which will be combined by the execution engine.
|
||||||
Name: fi.String(b.NameForDNSZone()),
|
iamPolicy.DNSZone = &awstasks.DNSZone{
|
||||||
|
Name: fi.String(b.NameForDNSZone()),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
t := &awstasks.IAMRolePolicy{
|
t := &awstasks.IAMRolePolicy{
|
||||||
|
|
Loading…
Reference in New Issue