Skip to content

Commit

Permalink
Breeze / KinD - support earlier k8s versions, fix recreate and kubect…
Browse files Browse the repository at this point in the history
…l versioning (#9905)

(cherry picked from commit 24a951e)
  • Loading branch information
bbenzikry authored and potiuk committed Jul 22, 2020
1 parent 5382db3 commit 8c6bebe
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion breeze
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/libraries/_initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions scripts/ci/libraries/_kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 8c6bebe

Please sign in to comment.