mirror of https://github.com/kubernetes/kops.git
Remove code for unsupported k8s versions from pkg/model
This commit is contained in:
parent
6e9dc8fc0f
commit
e428903871
|
@ -244,13 +244,11 @@ func (m *KopsModelContext) CloudTags(name string, shared bool) map[string]string
|
|||
|
||||
// Kubernetes 1.6 introduced the shared ownership tag; that replaces TagClusterName
|
||||
setLegacyTag := true
|
||||
if m.IsKubernetesGTE("1.6") {
|
||||
// For the moment, we only skip the legacy tag for shared resources
|
||||
// (other people may be using it)
|
||||
if shared {
|
||||
klog.V(4).Infof("Skipping %q tag for shared resource", awsup.TagClusterName)
|
||||
setLegacyTag = false
|
||||
}
|
||||
// For the moment, we only skip the legacy tag for shared resources
|
||||
// (other people may be using it)
|
||||
if shared {
|
||||
klog.V(4).Infof("Skipping %q tag for shared resource", awsup.TagClusterName)
|
||||
setLegacyTag = false
|
||||
}
|
||||
if setLegacyTag {
|
||||
tags[awsup.TagClusterName] = m.Cluster.ObjectMeta.Name
|
||||
|
|
|
@ -64,10 +64,10 @@ func (b *NetworkModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
Tags: vpcTags,
|
||||
}
|
||||
|
||||
if sharedVPC && b.IsKubernetesGTE("1.5") {
|
||||
// If we're running k8s 1.5, and we have e.g. --kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP,LegacyHostIP
|
||||
// then we don't need EnableDNSHostnames any more
|
||||
klog.V(4).Infof("Kubernetes version %q; skipping EnableDNSHostnames requirement on VPC", b.KubernetesVersion())
|
||||
if sharedVPC {
|
||||
// If we have e.g. --kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP,LegacyHostIP
|
||||
// then we don't need EnableDNSHostnames
|
||||
klog.V(4).Info("Skipping EnableDNSHostnames requirement on VPC")
|
||||
} else {
|
||||
// In theory we don't need to enable it for >= 1.5,
|
||||
// but seems safer to stick with existing behaviour
|
||||
|
|
Loading…
Reference in New Issue