From 0f63924ed4af905840a327f6cb67e8ddb7abc774 Mon Sep 17 00:00:00 2001 From: rongzhang Date: Fri, 7 Sep 2018 13:54:12 +0800 Subject: [PATCH] Add discovery_timeout to join configuration https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1alpha2#JoinConfiguration --- roles/kubernetes/kubeadm/defaults/main.yml | 3 +++ .../kubeadm/templates/kubeadm-client.conf.v1alpha2.j2 | 1 + 2 files changed, 4 insertions(+) create mode 100644 roles/kubernetes/kubeadm/defaults/main.yml diff --git a/roles/kubernetes/kubeadm/defaults/main.yml b/roles/kubernetes/kubeadm/defaults/main.yml new file mode 100644 index 000000000..d9ed537c2 --- /dev/null +++ b/roles/kubernetes/kubeadm/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# discovery_timeout modifies the discovery timeout +discovery_timeout: 5m0s diff --git a/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1alpha2.j2 b/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1alpha2.j2 index d53909940..62105fbde 100644 --- a/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1alpha2.j2 +++ b/roles/kubernetes/kubeadm/templates/kubeadm-client.conf.v1alpha2.j2 @@ -3,6 +3,7 @@ kind: NodeConfiguration clusterName: {{ cluster_name }} discoveryFile: "" caCertPath: {{ kube_config_dir }}/ssl/ca.crt +discoveryTimeout: {{ discovery_timeout }} discoveryToken: {{ kubeadm_token }} tlsBootstrapToken: {{ kubeadm_token }} token: {{ kubeadm_token }}