diff --git a/hack/ci/Makefile b/hack/ci/Makefile index a755ebe2..8951681f 100644 --- a/hack/ci/Makefile +++ b/hack/ci/Makefile @@ -2,7 +2,8 @@ PROJECT_ROOT ?= ../.. KYMA_CLI ?= "${PROJECT_ROOT}/${KYMA}" CLUSTER_NAME ?= kyma REGISTRY_PORT ?= 5001 -K3D_VERSION ?= 1.28.7 +K3D_VERSION ?= 1.28.4 +GARDENER_KUBE_VERSION ?= 1.28.4 .PHONY: create-kyma-system-ns create-kyma-system-ns: ## Create kyma-system namespace. @@ -10,7 +11,7 @@ create-kyma-system-ns: ## Create kyma-system namespace. .PHONY: create-k3d create-k3d: ## Create k3d with kyma CRDs. - "${KYMA_CLI}" provision k3d -p 8081:80@loadbalancer -p 8443:443@loadbalancer --registry-port ${REGISTRY_PORT} --name ${CLUSTER_NAME} -k ${K3D_VERSION} --ci + "${KYMA_CLI}" provision k3d -p 8081:80@loadbalancer -p 8443:443@loadbalancer --registry-port ${REGISTRY_PORT} --name ${CLUSTER_NAME} -k ${K3D_VERSION} --ci .PHONY: install-nats-module install-nats-module: @@ -68,7 +69,7 @@ wait-api-gateway-cr-ready: .PHONY: provision-gardener-cluster provision-gardener-cluster: - GARDENER_CLUSTER_VERSION="${K3D_VERSION}" PROJECT_ROOT="${PROJECT_ROOT}" KYMA_CLI="${KYMA_CLI}" ${PROJECT_ROOT}/scripts/gardener/aws/provision.sh + GARDENER_CLUSTER_VERSION="${GARDENER_KUBE_VERSION}" PROJECT_ROOT="${PROJECT_ROOT}" KYMA_CLI="${KYMA_CLI}" ${PROJECT_ROOT}/scripts/gardener/aws/provision.sh .PHONY: deprovision-gardener-cluster deprovision-gardener-cluster: diff --git a/scripts/gardener/aws/provision.sh b/scripts/gardener/aws/provision.sh index 3ed8a85e..17471ef8 100755 --- a/scripts/gardener/aws/provision.sh +++ b/scripts/gardener/aws/provision.sh @@ -58,12 +58,12 @@ gardener::validate_and_default() { fi if [ -z "$GARDENER_CLUSTER_VERSION" ]; then - # grep the default kube-version defined in kyma CLI. - export GARDENER_CLUSTER_VERSION="$(${KYMA_CLI} provision gardener aws --help | grep "kube-version string" | awk -F "\"" '{print $2}')" + # Detect supported kube-version. + export GARDENER_CLUSTER_VERSION=$(kubectl --kubeconfig="${GARDENER_KUBECONFIG}" get cloudprofiles.core.gardener.cloud aws -o go-template='{{range .spec.kubernetes.versions}}{{if eq .classification "supported"}}{{.version}}{{break}}{{end}}{{end}}') fi # Detect supported linux version. - GARDEN_LINUX_VERSION=$(kubectl --kubeconfig="${GARDENER_KUBECONFIG}" get cloudprofiles.core.gardener.cloud gcp -o go-template='{{range .spec.machineImages}}{{if eq .name "gardenlinux"}}{{range .versions}}{{if eq .classification "supported"}}{{.version}}{{end}}{{end}}{{end}}{{end}}') + GARDEN_LINUX_VERSION=$(kubectl --kubeconfig="${GARDENER_KUBECONFIG}" get cloudprofiles.core.gardener.cloud aws -o go-template='{{range .spec.machineImages}}{{if eq .name "gardenlinux"}}{{range .versions}}{{if eq .classification "supported"}}{{.version}}{{end}}{{end}}{{end}}{{end}}') # print configurations for debugging purposes: log::banner "Configurations:"