From 843019707dd02372ac781b22b8e3eca7aeac3ed4 Mon Sep 17 00:00:00 2001 From: Sadlil Date: Sat, 26 Dec 2020 15:08:26 +0000 Subject: [PATCH] Use appropriate ClusterDomain value in kubeadm KubeletConfiguration --- pkg/minikube/bootstrapper/bsutil/ktmpl/v1alpha3.go | 2 +- pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta1.go | 2 +- pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta2.go | 2 +- pkg/minikube/bootstrapper/bsutil/kubeadm_test.go | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.12/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.13/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.14/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.15/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.16/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.17/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.18/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.19/dns.yaml | 4 ++-- pkg/minikube/bootstrapper/bsutil/testdata/v1.20/dns.yaml | 4 ++-- pkg/minikube/registry/drvs/vmwarefusion/vmwarefusion.go | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1alpha3.go b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1alpha3.go index 20e839b49b2f..217c469c944b 100644 --- a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1alpha3.go +++ b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1alpha3.go @@ -70,7 +70,7 @@ networking: apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration cgroupDriver: {{.CgroupDriver}} -clusterDomain: "cluster.local" +clusterDomain: "{{if .DNSDomain}}{{.DNSDomain}}{{else}}cluster.local{{end}}" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta1.go b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta1.go index 342425f82db8..0cf00547983d 100644 --- a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta1.go +++ b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta1.go @@ -77,7 +77,7 @@ authentication: x509: clientCAFile: {{.ClientCAFile}} cgroupDriver: {{.CgroupDriver}} -clusterDomain: "cluster.local" +clusterDomain: "{{if .DNSDomain}}{{.DNSDomain}}{{else}}cluster.local{{end}}" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta2.go b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta2.go index 9e1cc650d56a..8b693c3cb2ed 100644 --- a/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta2.go +++ b/pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta2.go @@ -80,7 +80,7 @@ authentication: x509: clientCAFile: {{.ClientCAFile}} cgroupDriver: {{.CgroupDriver}} -clusterDomain: "cluster.local" +clusterDomain: "{{if .DNSDomain}}{{.DNSDomain}}{{else}}cluster.local{{end}}" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/kubeadm_test.go b/pkg/minikube/bootstrapper/bsutil/kubeadm_test.go index d17ac8786147..1f2ea830e51a 100644 --- a/pkg/minikube/bootstrapper/bsutil/kubeadm_test.go +++ b/pkg/minikube/bootstrapper/bsutil/kubeadm_test.go @@ -126,7 +126,7 @@ func recentReleases(n int) ([]string, error) { Need a separate test function to test the DNS server IP as v1.11 yaml file is very different compared to v1.12+. This test case has only 1 thing to test and that is the -nnetworking/dnsDomain value +networking/dnsDomain value */ func TestGenerateKubeadmYAMLDNS(t *testing.T) { // test all testdata releases greater than v1.11 @@ -150,7 +150,7 @@ func TestGenerateKubeadmYAMLDNS(t *testing.T) { shouldErr bool cfg config.ClusterConfig }{ - {"dns", "docker", false, config.ClusterConfig{Name: "mk", KubernetesConfig: config.KubernetesConfig{DNSDomain: "1.1.1.1"}}}, + {"dns", "docker", false, config.ClusterConfig{Name: "mk", KubernetesConfig: config.KubernetesConfig{DNSDomain: "minikube.local"}}}, } for _, version := range versions { for _, tc := range tests { diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.12/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.12/dns.yaml index 1d1912b3f2f9..43e9dcf6dc70 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.12/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.12/dns.yaml @@ -35,14 +35,14 @@ schedulerExtraArgs: leader-elect: "false" kubernetesVersion: v1.12.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.13/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.13/dns.yaml index db6105a7c2a2..083ed78b4b82 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.13/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.13/dns.yaml @@ -35,14 +35,14 @@ schedulerExtraArgs: leader-elect: "false" kubernetesVersion: v1.13.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.14/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.14/dns.yaml index 2b64ee7684df..524bc9d3013d 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.14/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.14/dns.yaml @@ -42,7 +42,7 @@ etcd: listen-metrics-urls: http://127.0.0.1:2381,http://1.1.1.1:2381 kubernetesVersion: v1.14.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.15/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.15/dns.yaml index c4d977e02633..f9f7136f84a4 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.15/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.15/dns.yaml @@ -42,7 +42,7 @@ etcd: listen-metrics-urls: http://127.0.0.1:2381,http://1.1.1.1:2381 kubernetesVersion: v1.15.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.16/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.16/dns.yaml index 789fbbb27912..5ac1e468ae6b 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.16/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.16/dns.yaml @@ -42,7 +42,7 @@ etcd: listen-metrics-urls: http://127.0.0.1:2381,http://1.1.1.1:2381 kubernetesVersion: v1.16.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.17/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.17/dns.yaml index d81012c76e98..a341b5d3b1b1 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.17/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.17/dns.yaml @@ -42,7 +42,7 @@ etcd: proxy-refresh-interval: "70000" kubernetesVersion: v1.17.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.18/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.18/dns.yaml index a4f6629ff1e1..26a4f09f5a36 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.18/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.18/dns.yaml @@ -42,7 +42,7 @@ etcd: proxy-refresh-interval: "70000" kubernetesVersion: v1.18.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.19/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.19/dns.yaml index 260b478b0acf..643d30196458 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.19/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.19/dns.yaml @@ -42,7 +42,7 @@ etcd: proxy-refresh-interval: "70000" kubernetesVersion: v1.19.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/bootstrapper/bsutil/testdata/v1.20/dns.yaml b/pkg/minikube/bootstrapper/bsutil/testdata/v1.20/dns.yaml index 8c61c65ff3a0..52f04de0ba6f 100644 --- a/pkg/minikube/bootstrapper/bsutil/testdata/v1.20/dns.yaml +++ b/pkg/minikube/bootstrapper/bsutil/testdata/v1.20/dns.yaml @@ -42,7 +42,7 @@ etcd: proxy-refresh-interval: "70000" kubernetesVersion: v1.20.0 networking: - dnsDomain: 1.1.1.1 + dnsDomain: minikube.local podSubnet: "10.244.0.0/16" serviceSubnet: 10.96.0.0/12 --- @@ -52,7 +52,7 @@ authentication: x509: clientCAFile: /var/lib/minikube/certs/ca.crt cgroupDriver: systemd -clusterDomain: "cluster.local" +clusterDomain: "minikube.local" # disable disk resource management by default imageGCHighThresholdPercent: 100 evictionHard: diff --git a/pkg/minikube/registry/drvs/vmwarefusion/vmwarefusion.go b/pkg/minikube/registry/drvs/vmwarefusion/vmwarefusion.go index 1d3edb1a24e9..649bb8513d99 100644 --- a/pkg/minikube/registry/drvs/vmwarefusion/vmwarefusion.go +++ b/pkg/minikube/registry/drvs/vmwarefusion/vmwarefusion.go @@ -38,7 +38,7 @@ func init() { func status() registry.State { return registry.State{ - Error: fmt.Errorf("The 'vmwarefusion' driver is no longer available"), + Error: fmt.Errorf("the 'vmwarefusion' driver is no longer available"), Fix: "Switch to the newer 'vmware' driver by using '--driver=vmware'. This may require first deleting your existing cluster", Doc: "https://minikube.sigs.k8s.io/docs/drivers/vmware/", }