Skip to content

Commit

Permalink
Proper way to wait for kube-dns pod is ready for patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jul 24, 2024
1 parent 7722f6c commit 3a87ee8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ HELM_RUN := docker run --rm -v ~/.kube:/root/.kube -e KUBECONFIG=/root/.kube/con
fix_dns_upstream:
$(KUBECTL_RUN) '\
while :; do \
kubectl -n kube-system get pods -l k8s-app=kube-dns | grep coredns || { \
echo -n .; \
sleep 1; \
continue; \
}; \
break; \
done ; \
kubectl -n kube-system wait --for=condition=Ready pod --timeout=180s -l k8s-app=kube-dns && \
kubectl -n kube-system get configmap coredns -o yaml | sed "s,forward . /etc/resolv.conf,forward \. 8.8.8.8," | kubectl apply -f - && \
kubectl delete pod -n kube-system -l k8s-app=kube-dns \
'


crossplane_rolebinding_workaround:
$(KUBECTL_RUN) '\
for i in kcl-function provider-kubernetes provider-helm; do \
Expand Down

0 comments on commit 3a87ee8

Please sign in to comment.