mirror of https://github.com/kubernetes/kops.git
Allow migration from Gossip DNS to no DNS
This commit is contained in:
parent
1c0e17340a
commit
362601cd66
|
|
@ -820,10 +820,10 @@ func (c *Cluster) IsSharedAzureRouteTable() bool {
|
|||
}
|
||||
|
||||
func (c *Cluster) IsGossip() bool {
|
||||
if dns.IsGossipClusterName(c.Name) {
|
||||
return true
|
||||
if c.UsesNoneDNS() || !dns.IsGossipClusterName(c.Name) {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *Cluster) UsesPublicDNS() bool {
|
||||
|
|
|
|||
|
|
@ -45,15 +45,14 @@ import (
|
|||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/kops/pkg/flagbuilder"
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
kopscontrollerconfig "k8s.io/kops/cmd/kops-controller/pkg/config"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
apiModel "k8s.io/kops/pkg/apis/kops/model"
|
||||
"k8s.io/kops/pkg/apis/kops/util"
|
||||
"k8s.io/kops/pkg/apis/nodeup"
|
||||
"k8s.io/kops/pkg/dns"
|
||||
"k8s.io/kops/pkg/featureflag"
|
||||
"k8s.io/kops/pkg/flagbuilder"
|
||||
"k8s.io/kops/pkg/kubemanifest"
|
||||
"k8s.io/kops/pkg/model"
|
||||
"k8s.io/kops/pkg/model/components/kopscontroller"
|
||||
|
|
@ -66,6 +65,7 @@ import (
|
|||
gcetpm "k8s.io/kops/upup/pkg/fi/cloudup/gce/tpm"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/hetzner"
|
||||
"k8s.io/kops/util/pkg/env"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
// TemplateFunctions provides a collection of methods used throughout the templates
|
||||
|
|
@ -127,7 +127,7 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
|
|||
dest["GossipDomains"] = func() []string {
|
||||
var names []string
|
||||
|
||||
if cluster.IsGossip() {
|
||||
if dns.IsGossipClusterName(cluster.Name) {
|
||||
names = append(names, "k8s.local")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue