Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breeze / KinD - support earlier k8s versions, fix recreate and kubectl versioning #9905

Merged
merged 6 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,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 @@ -1867,9 +1867,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 @@ -2088,6 +2088,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 presto 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.7 8"
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 @@ -209,7 +209,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