You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2020/08/11 22:34:59 UTC

[airflow] 18/32: Breeze / KinD - support earlier k8s versions, fix recreate and kubectl versioning (#9905)

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

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

commit 6b219e19f32ccb7017fae33a761fa5e800f6e56f
Author: Beni Ben zikry <bb...@gmail.com>
AuthorDate: Wed Jul 22 13:24:46 2020 +0300

    Breeze / KinD  - support earlier k8s versions, fix recreate and kubectl versioning (#9905)
    
    (cherry picked from commit 24a951e8ed7159d3c2cbdb76d8d4ab807ee95cbd)
---
 .github/workflows/ci.yml                | 3 +--
 BREEZE.rst                              | 4 ++--
 breeze                                  | 4 +++-
 breeze-complete                         | 2 +-
 scripts/ci/libraries/_initialization.sh | 2 +-
 scripts/ci/libraries/_kind.sh           | 6 +++---
 6 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d0e7ab2..72f6ba5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -130,8 +130,7 @@ jobs:
         python-version: [3.6, 3.7]
         kube-mode:
           - image
-        kubernetes-version:
-          - "v1.18.2"
+        kubernetes-version: [v1.18.6, v1.17.5, v1.16.9]
         kind-version:
           - "v0.8.0"
         helm-version:
diff --git a/BREEZE.rst b/BREEZE.rst
index 5976b0f..60ea13a 100644
--- a/BREEZE.rst
+++ b/BREEZE.rst
@@ -1756,9 +1756,9 @@ This is the current syntax for  `./breeze <./breeze>`_:
           Kubernetes version - only used in case one of --kind-cluster-* commands is used.
           One of:
 
-                 v1.18.2
+                 v1.18.6 v1.17.5 v1.16.9
 
-          Default: v1.18.2
+          Default: v1.18.6
 
   --kind-version <KIND_VERSION>
           Kind version - only used in case one of --kind-cluster-* commands is used.
diff --git a/breeze b/breeze
index 91585a1..44e8d03 100755
--- a/breeze
+++ b/breeze
@@ -146,7 +146,7 @@ function setup_default_breeze_variables() {
 
     _BREEZE_DEFAULT_BACKEND="sqlite"
     _BREEZE_DEFAULT_KUBERNETES_MODE="image"
-    _BREEZE_DEFAULT_KUBERNETES_VERSION="v1.18.2"
+    _BREEZE_DEFAULT_KUBERNETES_VERSION="v1.18.6"
     _BREEZE_DEFAULT_KIND_VERSION="v0.8.0"
     _BREEZE_DEFAULT_HELM_VERSION="v3.2.4"
     _BREEZE_DEFAULT_POSTGRES_VERSION="9.6"
@@ -1927,6 +1927,8 @@ function run_build_command {
               echo "Stops KinD cluster"
             elif [[ ${KIND_CLUSTER_OPERATION} == "restart" ]] ; then
               echo "Restarts KinD cluster"
+            elif [[ ${KIND_CLUSTER_OPERATION} == "recreate" ]] ; then
+              echo "Recreates KinD cluster"
             elif [[ ${KIND_CLUSTER_OPERATION} == "status" ]] ; then
               echo "Checks status of KinD cluster"
             elif [[ ${KIND_CLUSTER_OPERATION} == "deploy" ]] ; then
diff --git a/breeze-complete b/breeze-complete
index 574b9c7..45732b3 100644
--- a/breeze-complete
+++ b/breeze-complete
@@ -21,7 +21,7 @@ _BREEZE_ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS="2.7 3.5 3.6 3.7 3.8"
 _BREEZE_ALLOWED_BACKENDS="sqlite mysql postgres"
 _BREEZE_ALLOWED_INTEGRATIONS="cassandra kerberos mongo openldap rabbitmq redis all"
 _BREEZE_ALLOWED_KUBERNETES_MODES="image git"
-_BREEZE_ALLOWED_KUBERNETES_VERSIONS="v1.18.2"
+_BREEZE_ALLOWED_KUBERNETES_VERSIONS="v1.18.6 v1.17.5 v1.16.9"
 _BREEZE_ALLOWED_HELM_VERSIONS="v3.2.4"
 _BREEZE_ALLOWED_KIND_VERSIONS="v0.8.0"
 _BREEZE_ALLOWED_MYSQL_VERSIONS="5.6 5.7"
diff --git a/scripts/ci/libraries/_initialization.sh b/scripts/ci/libraries/_initialization.sh
index d3224e7..63041fd 100644
--- a/scripts/ci/libraries/_initialization.sh
+++ b/scripts/ci/libraries/_initialization.sh
@@ -205,7 +205,7 @@ function initialize_common_environment {
     export VERSION_SUFFIX_FOR_SVN=""
 
     # Default Kubernetes version
-    export DEFAULT_KUBERNETES_VERSION="v1.18.2"
+    export DEFAULT_KUBERNETES_VERSION="v1.18.6"
 
     # Default KinD version
     export DEFAULT_KIND_VERSION="v0.8.0"
diff --git a/scripts/ci/libraries/_kind.sh b/scripts/ci/libraries/_kind.sh
index 2cf43c3..173af6d 100644
--- a/scripts/ci/libraries/_kind.sh
+++ b/scripts/ci/libraries/_kind.sh
@@ -45,7 +45,7 @@ function make_sure_kubernetes_tools_are_installed() {
     HELM_VERSION=${HELM_VERSION:=${DEFAULT_HELM_VERSION}}
     HELM_URL="https://get.helm.sh/helm-${HELM_VERSION}-${SYSTEM}-amd64.tar.gz"
     HELM_PATH="${BUILD_CACHE_DIR}/bin/helm"
-    KUBECTL_VERSION=${KUBENETES_VERSION:=${DEFAULT_KUBERNETES_VERSION}}
+    KUBECTL_VERSION=${KUBERNETES_VERSION:=${DEFAULT_KUBERNETES_VERSION}}
     KUBECTL_URL="https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/${SYSTEM}/amd64/kubectl"
     KUBECTL_PATH="${BUILD_CACHE_DIR}/bin/kubectl"
     mkdir -pv "${BUILD_CACHE_DIR}/bin"
@@ -125,7 +125,7 @@ function delete_cluster() {
 }
 
 function perform_kind_cluster_operation() {
-    ALLOWED_KIND_OPERATIONS="[ start restart stop deploy test shell ]"
+    ALLOWED_KIND_OPERATIONS="[ start restart stop deploy test shell recreate ]"
 
     set +u
     if [[ -z "${1}" ]]; then
@@ -215,7 +215,7 @@ function perform_kind_cluster_operation() {
             echo "Creating cluster"
             echo
             create_cluster
-        elif [[ ${OPERATION} == "stop" || ${OEPRATON} == "deploy" || \
+        elif [[ ${OPERATION} == "stop" || ${OPERATION} == "deploy" || \
                 ${OPERATION} == "test" || ${OPERATION} == "shell" ]]; then
             echo >&2
             echo >&2 "Cluster ${KIND_CLUSTER_NAME} does not exist. It should exist for ${OPERATION} operation"