From 5a0d8067f6eb3598e275afd26b6626983c86dc0c Mon Sep 17 00:00:00 2001 From: Anusha Hegde Date: Wed, 6 Apr 2022 09:55:19 +0000 Subject: [PATCH] Update k8s version in e2e tests - updated e2e k8s version to v1.23.4 - updated corresponding Dockerfiles - pushed a new bundle to Harbor - minor corrections to docs --- Makefile | 4 ++-- .../bundle_builder/ingredients/deb/Dockerfile | 6 +++--- .../bundle_builder/ingredients/deb/download.sh | 2 +- docs/BYOHDockerFileDev | 2 +- docs/getting_started.md | 14 +++++++------- docs/local_dev.md | 4 ++-- hack/getting_started.sh | 4 ++-- test/e2e/BYOHDockerFile | 2 +- test/e2e/config/provider.yaml | 4 ++-- test/e2e/docker_helper.go | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index a9f2c94ad..c71acce87 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ RELEASE_DIR := _dist # Image URL to use all building/pushing image targets IMG ?= ${STAGING_REGISTRY}/${IMAGE_NAME}:${TAG} -BYOH_BASE_IMG = byoh/node:v1.22.3 -BYOH_BASE_IMG_DEV = byoh-dev/node:v1.22.3 +BYOH_BASE_IMG = byoh/node:e2e +BYOH_BASE_IMG_DEV = byoh/node:dev # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" diff --git a/agent/installer/bundle_builder/ingredients/deb/Dockerfile b/agent/installer/bundle_builder/ingredients/deb/Dockerfile index 811fdd6b5..336ea937e 100644 --- a/agent/installer/bundle_builder/ingredients/deb/Dockerfile +++ b/agent/installer/bundle_builder/ingredients/deb/Dockerfile @@ -8,12 +8,12 @@ # 2. Run the image # -ARG BASE_IMAGE=ubuntu:18.04 +ARG BASE_IMAGE=ubuntu:20.04 FROM $BASE_IMAGE as build # Override to download other version -ENV CONTAINERD_VERSION=1.5.7 -ENV KUBERNETES_VERSION=1.21.2-00 +ENV CONTAINERD_VERSION=1.6.0 +ENV KUBERNETES_VERSION=1.23.5-00 ENV ARCH=amd64 RUN apt-get update \ diff --git a/agent/installer/bundle_builder/ingredients/deb/download.sh b/agent/installer/bundle_builder/ingredients/deb/download.sh index 9aa91c8aa..2f6b24265 100644 --- a/agent/installer/bundle_builder/ingredients/deb/download.sh +++ b/agent/installer/bundle_builder/ingredients/deb/download.sh @@ -22,4 +22,4 @@ echo Update apt package index, install kubelet, kubeadm and kubectl sudo apt-get update sudo apt-get download {kubelet,kubeadm,kubectl}:$ARCH=$KUBERNETES_VERSION sudo apt-get download kubernetes-cni:$ARCH=0.8.7-00 -sudo apt-get download cri-tools:$ARCH=1.19.0-00 +sudo apt-get download cri-tools:$ARCH=1.23.0-00 diff --git a/docs/BYOHDockerFileDev b/docs/BYOHDockerFileDev index c22138a20..60095b14f 100644 --- a/docs/BYOHDockerFileDev +++ b/docs/BYOHDockerFileDev @@ -16,7 +16,7 @@ RUN echo "Installing kubectl kubeadm kubelet" \ && curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \ && apt-get update \ && apt-get install -y linux-image-$(uname -r) \ - && apt-get install -y kubelet=1.22.3-00 kubeadm=1.22.3-00 kubectl=1.22.3-00 \ + && apt-get install -y kubelet=1.23.4-00 kubeadm=1.23.4-00 kubectl=1.23.4-00 \ && apt-mark hold containerd kubelet kubeadm kubectl \ && apt-get clean \ && systemctl enable kubelet.service \ diff --git a/docs/getting_started.md b/docs/getting_started.md index efea48517..2b61d81c3 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -91,7 +91,7 @@ Once the image is ready, lets start 2 docker containers for our deployment. One for i in {1..2} do echo "Creating docker container named host$i" - docker run --detach --tty --hostname host$i --name host$i --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --network kind byoh-dev/node:v1.22.3 + docker run --detach --tty --hostname host$i --name host$i --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --network kind byoh/node:dev done ``` @@ -122,7 +122,7 @@ $ cat /etc/hosts ``` If you are trying this on your own hosts, then for each host -1. Download the [byoh-hostagent-linux-amd64](https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/releases/download/v0.1.0/byoh-hostagent-linux-amd64) +1. Download the [byoh-hostagent-linux-amd64](https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/releases/download/v0.1.1/byoh-hostagent-linux-amd64) 2. Copy the management cluster `kubeconfig` file as `management.conf` 3. Start the agent ```shell @@ -185,16 +185,16 @@ Create the workload cluster ```shell # for vms as byohosts -$ CONTROL_PLANE_ENDPOINT_IP=10.10.10.10 clusterctl generate cluster byoh-cluster \ +$ BUNDLE_LOOKUP_TAG=v1.23.4 CONTROL_PLANE_ENDPOINT_IP=10.10.10.10 clusterctl generate cluster byoh-cluster \ --infrastructure byoh \ - --kubernetes-version v1.22.3 \ + --kubernetes-version v1.23.4 \ --control-plane-machine-count 1 \ --worker-machine-count 1 > cluster.yaml # for docker hosts use the --flavor argument -$ CONTROL_PLANE_ENDPOINT_IP=10.10.10.10 clusterctl generate cluster byoh-cluster \ +$ BUNDLE_LOOKUP_TAG=v1.23.4 CONTROL_PLANE_ENDPOINT_IP=10.10.10.10 clusterctl generate cluster byoh-cluster \ --infrastructure byoh \ - --kubernetes-version v1.22.3 \ + --kubernetes-version v1.23.4 \ --control-plane-machine-count 1 \ --worker-machine-count 1 \ --flavor docker > cluster.yaml @@ -229,7 +229,7 @@ after that you should see your nodes turn into ready: ```shell $ KUBECONFIG=byoh-cluster.kubeconfig kubectl get nodes NAME STATUS ROLES AGE VERSION -byoh-cluster-8siai8 Ready master 5m v1.22.3 +byoh-cluster-8siai8 Ready master 5m v1.23.4 ``` diff --git a/docs/local_dev.md b/docs/local_dev.md index 92bd970d6..be4a75dbf 100644 --- a/docs/local_dev.md +++ b/docs/local_dev.md @@ -261,14 +261,14 @@ This step describes providing custom kubernetes host components. They can be cop ```shell # Build a BYOH bundle and publish it to an OCI-compliant repo -docker run --rm -v `pwd`/byoh-ingredients-download:/ingredients --env BUILD_ONLY=0 build-push-bundle / +docker run --rm -v `pwd`/byoh-ingredients-download:/ingredients --env BUILD_ONLY=0 byoh-build-push-bundle / ``` The specified above BYOH Bundle name must match one of the [Supported OS and kubernetes BYOH bundle names](##supported-OS-and-kubernetes) ```shell # You can also build a tarball of the bundle without publishing. This will create a bundler.tar in the current directory and can be used for custom pushing -docker run --rm -v `pwd`/byoh-ingredients-download:/ingredients -v`pwd`:/bundle --env BUILD_ONLY=1 build-push-bundle +docker run --rm -v `pwd`/byoh-ingredients-download:/ingredients -v`pwd`:/bundle --env BUILD_ONLY=1 byoh-build-push-bundle ``` ```shell diff --git a/hack/getting_started.sh b/hack/getting_started.sh index bb57b3b5f..32e5453eb 100755 --- a/hack/getting_started.sh +++ b/hack/getting_started.sh @@ -525,7 +525,7 @@ It locally will change the following host config export PATH=/snap/bin:${PATH} byohImageName="byoh/node" -byohImageTag="v1.22.3" +byohImageTag="e2e" managerClusterName="kind-byoh" workerClusterName="worker-byoh" controlPlaneEndPointIp="" @@ -537,7 +537,7 @@ manageClusterConfFile="${HOME}/.kube/management-cluster.conf" kubeConfigFile=/tmp/byoh-cluster-kubeconfig reposDir=$(dirname $0)/../ byohBinaryFile=${reposDir}/bin/byoh-hostagent-linux-amd64 -kubernetesVersion="v1.22.3" +kubernetesVersion="v1.23.4" readArgs $@ userConfirmation diff --git a/test/e2e/BYOHDockerFile b/test/e2e/BYOHDockerFile index 7e5990c34..ce8458975 100644 --- a/test/e2e/BYOHDockerFile +++ b/test/e2e/BYOHDockerFile @@ -5,7 +5,7 @@ ARG TARGETARCH RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ systemd conntrack iptables iproute2 ethtool socat util-linux mount \ - ebtables kmod libseccomp2 pigz bash ca-certificates \ + apparmor-utils ebtables kmod libseccomp2 pigz bash ca-certificates \ rsync nfs-common fuse-overlayfs curl gnupg2 \ dbus ufw linux-image-$(uname -r) \ && ln -s "$(which systemd)" /sbin/init diff --git a/test/e2e/config/provider.yaml b/test/e2e/config/provider.yaml index 7f777f5dc..a8a4b8e79 100644 --- a/test/e2e/config/provider.yaml +++ b/test/e2e/config/provider.yaml @@ -79,7 +79,7 @@ providers: variables: # default variables for the e2e test; those values could be overridden via env variables, thus # allowing the same e2e config file to be re-used in different prow jobs e.g. each one with a K8s version permutation - KUBERNETES_VERSION: "v1.22.3" + KUBERNETES_VERSION: "v1.23.5" ETCD_VERSION_UPGRADE_TO: "3.4.9-0" COREDNS_VERSION_UPGRADE_TO: "1.7.0" KUBERNETES_VERSION_UPGRADE_TO: "v1.22.0" @@ -95,7 +95,7 @@ variables: NODE_DRAIN_TIMEOUT: "60s" # NOTE: INIT_WITH_BINARY is used only by the clusterctl upgrade test to initialize the management cluster to be upgraded INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.1.3/clusterctl-{OS}-{ARCH}" - BUNDLE_LOOKUP_TAG: "v1.22.3" + BUNDLE_LOOKUP_TAG: "v1.23.5" CONTROL_PLANE_ENDPOINT_IP: "" intervals: diff --git a/test/e2e/docker_helper.go b/test/e2e/docker_helper.go index 1225f82b6..dc8406837 100644 --- a/test/e2e/docker_helper.go +++ b/test/e2e/docker_helper.go @@ -25,7 +25,7 @@ import ( ) const ( - kindImage = "byoh/node:v1.22.3" + kindImage = "byoh/node:e2e" tempKubeconfigPath = "/tmp/mgmt.conf" )