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

🌱 Use k8s 1.30.3 #668

Merged
merged 1 commit into from
Aug 16, 2024
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
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.3

- 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.3
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"
Danil-Grigorev marked this conversation as resolved.
Show resolved Hide resolved
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.3
extraMounts:
- hostPath: /var/run/docker.sock
containerPath: /var/run/docker.sock
4 changes: 2 additions & 2 deletions test/e2e/config/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ variables:
HELM_BINARY_PATH: "helm"
HELM_EXTRA_VALUES_FOLDER: "/tmp"
KUBERNETES_VERSION: "v1.30.3"
KUBERNETES_MANAGEMENT_VERSION: "v1.30.0"
KUBERNETES_MANAGEMENT_VERSION: "v1.30.3"
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_VERSION: "v1.30.1"
RANCHER_REPO_NAME: "rancher-latest"
RANCHER_ALPHA_REPO_NAME: "rancher-alpha"
RANCHER_URL: "https://releases.rancher.com/server-charts/latest"
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/data/cluster-templates/docker-rke2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ metadata:
name: ${CLUSTER_NAME}-control-plane
spec:
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: ${KUBERNETES_VERSION}+rke2r1
version: ${RKE2_VERSION}
registrationMethod: internal-first
rolloutStrategy:
rollingUpdate:
Expand Down Expand Up @@ -94,7 +94,7 @@ spec:
cluster.x-k8s.io/cluster-name: ${CLUSTER_NAME}
template:
spec:
version: ${KUBERNETES_VERSION}+rke2r1
version: ${RKE2_VERSION}
clusterName: ${CLUSTER_NAME}
bootstrap:
configRef:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/data/cluster-templates/vsphere-kubeadm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ data:
- --v=2
- --cloud-provider=vsphere
- --cloud-config=/etc/cloud/vsphere.conf
image: gcr.io/cloud-provider-vsphere/cpi/release/manager:${CPI_IMAGE_K8S_VERSION}
image: gcr.io/cloud-provider-vsphere/cpi/release/manager:${CPI_IMAGE_VERSION}
name: vsphere-cloud-controller-manager
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/data/cluster-templates/vsphere-rke2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ data:
- --v=2
- --cloud-provider=vsphere
- --cloud-config=/etc/cloud/vsphere.conf
image: gcr.io/cloud-provider-vsphere/cpi/release/manager:${CPI_IMAGE_K8S_VERSION}
image: gcr.io/cloud-provider-vsphere/cpi/release/manager:${CPI_IMAGE_VERSION}
name: vsphere-cloud-controller-manager
resources:
requests:
Expand Down