Skip to content

Commit

Permalink
Use appropriate ClusterDomain value in kubeadm KubeletConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
sadlil committed Dec 26, 2020
1 parent 3dac483 commit 6af2c7e
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/bsutil/ktmpl/v1alpha3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/bsutil/ktmpl/v1beta2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/kubeadm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.12/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.13/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.14/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.15/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.16/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.17/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.18/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.19/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/testdata/v1.20/dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/registry/drvs/vmwarefusion/vmwarefusion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
}
Expand Down

0 comments on commit 6af2c7e

Please sign in to comment.