Skip to content

Commit

Permalink
Update k8s version in e2e tests
Browse files Browse the repository at this point in the history
- updated e2e k8s version to v1.23.4
- updated corresponding Dockerfiles
- pushed a new bundle to Harbor
- minor corrections to docs
  • Loading branch information
anusha94 committed Apr 6, 2022
1 parent b69dcf2 commit 5a0d806
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions agent/installer/bundle_builder/ingredients/deb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion agent/installer/bundle_builder/ingredients/deb/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/BYOHDockerFileDev
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
14 changes: 7 additions & 7 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
```

Expand Down
4 changes: 2 additions & 2 deletions docs/local_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <REPO>/<BYOH Bundle name>
docker run --rm -v `pwd`/byoh-ingredients-download:/ingredients --env BUILD_ONLY=0 byoh-build-push-bundle <REPO>/<BYOH Bundle name>
```

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
Expand Down
4 changes: 2 additions & 2 deletions hack/getting_started.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/BYOHDockerFile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/config/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/docker_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

const (
kindImage = "byoh/node:v1.22.3"
kindImage = "byoh/node:e2e"
tempKubeconfigPath = "/tmp/mgmt.conf"
)

Expand Down

0 comments on commit 5a0d806

Please sign in to comment.