You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by di...@apache.org on 2020/06/15 17:22:06 UTC

[airflow] branch v1-10-test updated: Fix up coredns pods in KIND CI (#9224)

This is an automated email from the ASF dual-hosted git repository.

dimberman pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v1-10-test by this push:
     new 11930a2  Fix up coredns pods in KIND CI (#9224)
11930a2 is described below

commit 11930a274f79fcfae1196efd329fe414b62c6ed3
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Thu Jun 11 10:39:57 2020 +0100

    Fix up coredns pods in KIND CI (#9224)
    
    These were passing for a while, but seemingly broke after _something_
    outside of the airflow code base changed (DNS of Github Actions runners?
    Phase of the moon) so adding this config map that we had when KIND
    inside docker, rather than in the host.
    
    Co-authored-by: Ash Berlin-Taylor <as...@firemirror.com>
    
    Co-authored-by: Daniel Imberman <da...@gmail.com>
    (cherry picked from commit 151924343c804709ad0053b0643fc2bb563da50d)
---
 scripts/ci/libraries/_kind.sh | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/scripts/ci/libraries/_kind.sh b/scripts/ci/libraries/_kind.sh
index 22cb652..00c35a3 100644
--- a/scripts/ci/libraries/_kind.sh
+++ b/scripts/ci/libraries/_kind.sh
@@ -91,6 +91,31 @@ function create_cluster() {
     echo "Created cluster ${KIND_CLUSTER_NAME}"
     echo
 
+    echo
+    echo "Patching CoreDNS to avoid loop and to use 8.8.8.8 DNS as forward address."
+    echo
+    echo "============================================================================"
+    echo "      Original coredns configmap:"
+    echo "============================================================================"
+    kubectl --cluster "${KUBECTL_CLUSTER_NAME}" get configmaps --namespace=kube-system coredns -o yaml
+    kubectl --cluster "${KUBECTL_CLUSTER_NAME}" get configmaps --namespace=kube-system coredns -o yaml | \
+        sed 's/forward \. .*$/forward . 8.8.8.8/' | kubectl --cluster "${KUBECTL_CLUSTER_NAME}" apply -f -
+
+    echo
+    echo "============================================================================"
+    echo "      Updated coredns configmap with new forward directive:"
+    echo "============================================================================"
+    kubectl --cluster "${KUBECTL_CLUSTER_NAME}" get configmaps --namespace=kube-system coredns -o yaml
+
+
+    echo
+    echo "Restarting CoreDNS"
+    echo
+    kubectl --cluster "${KUBECTL_CLUSTER_NAME}" scale deployment --namespace=kube-system coredns --replicas=0
+    kubectl --cluster "${KUBECTL_CLUSTER_NAME}" scale deployment --namespace=kube-system coredns --replicas=2
+    echo
+    echo "Restarted CoreDNS"
+    echo
 }
 
 function delete_cluster() {