mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Merge pull request #57337 from wwwtyro/rye/wait-kube-dns
Automatic merge from submit-queue (batch tested with PRs 55751, 57337, 56406, 56864, 57347). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Wait for kubedns to be ready when collecting the cluster IP. **What this PR does / why we need it**: Wait for kubedns to be ready when collecting the cluster IP. **Release note**: ```release-note Wait for kubedns to be ready when collecting the cluster IP. ```
This commit is contained in:
commit
4c36d487f0
@ -469,7 +469,13 @@ def send_cluster_dns_detail(kube_control):
|
|||||||
''' Send cluster DNS info '''
|
''' Send cluster DNS info '''
|
||||||
enableKubeDNS = hookenv.config('enable-kube-dns')
|
enableKubeDNS = hookenv.config('enable-kube-dns')
|
||||||
dnsDomain = hookenv.config('dns_domain')
|
dnsDomain = hookenv.config('dns_domain')
|
||||||
dns_ip = None if not enableKubeDNS else get_dns_ip()
|
dns_ip = None
|
||||||
|
if enableKubeDNS:
|
||||||
|
try:
|
||||||
|
dns_ip = get_dns_ip()
|
||||||
|
except CalledProcessError:
|
||||||
|
hookenv.log("kubedns not ready yet")
|
||||||
|
return
|
||||||
kube_control.set_dns(53, dnsDomain, dns_ip, enableKubeDNS)
|
kube_control.set_dns(53, dnsDomain, dns_ip, enableKubeDNS)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user