Skip to content

Commit

Permalink
Use k8s 1.30.4
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Aug 16, 2024
1 parent 4400b32 commit 355e76b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
uses: helm/kind-action@v1.9.0
with:
cluster_name: kind
node_image: kindest/node:v1.30.0
node_image: kindest/node:v1.30.4

- name: Add local docker image
run: kind load docker-image ${{ env.MANIFEST_IMG }}:${{ env.TAG }}
Expand Down
23 changes: 9 additions & 14 deletions hack/ensure-kubectl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,26 @@ fi
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"

GOPATH_BIN="$(go env GOPATH)/bin/"
MINIMUM_KUBECTL_VERSION=v1.30.0
MINIMUM_KUBECTL_VERSION=v1.30.4
goarch="$(go env GOARCH)"
goos="$(go env GOOS)"

# Ensure the kubectl tool exists and is a viable version, or installs it
verify_kubectl_version() {

local kubectl_version
IFS=" " read -ra kubectl_version <<< "$(kubectl version --client || echo 'v0.0.0')"

# If kubectl is not available on the path, get it
if ! [ -x "$(command -v kubectl)" ]; then
if ! [ -x "$(command -v kubectl)" ] || [[ "${MINIMUM_KUBECTL_VERSION}" != $(echo -e "${MINIMUM_KUBECTL_VERSION}\n${kubectl_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) ]]; then
if [ "$goos" == "linux" ] || [ "$goos" == "darwin" ]; then
if ! [ -d "${GOPATH_BIN}" ]; then
mkdir -p "${GOPATH_BIN}"
fi
echo 'kubectl not found, installing'

echo "kubectl not found or below ${MINIMUM_KUBECTL_VERSION}, installing"
echo "Updating to ${MINIMUM_KUBECTL_VERSION}."

curl -sLo "${GOPATH_BIN}/kubectl" "https://dl.k8s.io/release/${MINIMUM_KUBECTL_VERSION}/bin/${goos}/${goarch}/kubectl"
chmod +x "${GOPATH_BIN}/kubectl"
verify_gopath_bin
Expand All @@ -48,17 +54,6 @@ verify_kubectl_version() {
return 2
fi
fi

local kubectl_version
IFS=" " read -ra kubectl_version <<< "$(kubectl version --client)"
if [[ "${MINIMUM_KUBECTL_VERSION}" != $(echo -e "${MINIMUM_KUBECTL_VERSION}\n${kubectl_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) ]]; then
cat <<EOF
Detected kubectl version: ${kubectl_version[2]}.
Requires ${MINIMUM_KUBECTL_VERSION} or greater.
Please install ${MINIMUM_KUBECTL_VERSION} or later.
EOF
return 2
fi
}

install_plugins() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/kind-cluster-with-extramounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: kind.x-k8s.io/v1alpha4
name: capi-test
nodes:
- role: control-plane
image: kindest/node:v1.30.0
image: kindest/node:v1.30.4
extraMounts:
- hostPath: /var/run/docker.sock
containerPath: /var/run/docker.sock
6 changes: 3 additions & 3 deletions test/e2e/config/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ variables:
ARTIFACTS_FOLDER: "_artifacts"
HELM_BINARY_PATH: "helm"
HELM_EXTRA_VALUES_FOLDER: "/tmp"
KUBERNETES_VERSION: "v1.30.3"
KUBERNETES_MANAGEMENT_VERSION: "v1.30.0"
KUBERNETES_VERSION: "v1.30.4"
KUBERNETES_MANAGEMENT_VERSION: "v1.30.4"
RKE2_VERSION: "v1.30.3+rke2r1"
KUBERNETES_MANAGEMENT_AWS_REGION: "eu-west-2"
RANCHER_HOSTNAME: "localhost"
Expand All @@ -49,7 +49,7 @@ variables:
TURTLES_PATH: "turtles/rancher-turtles"
TURTLES_REPO_NAME: "turtles"
TURTLES_URL: https://rancher.github.io/turtles
CPI_IMAGE_K8S_VERSION: "v1.30.0"
CPI_IMAGE_K8S_VERSION: "v1.30.4"
RANCHER_REPO_NAME: "rancher-latest"
RANCHER_ALPHA_REPO_NAME: "rancher-alpha"
RANCHER_URL: "https://releases.rancher.com/server-charts/latest"
Expand Down

0 comments on commit 355e76b

Please sign in to comment.