Skip to content

Commit

Permalink
kubernetes: v1.21.2 (#1163)
Browse files Browse the repository at this point in the history
* bump kubernetes version to 1.21.2
  • Loading branch information
briandowns authored Jun 21, 2021
1 parent b28e4f1 commit 2081963
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ RUN CHART_VERSION="v3.1906" CHART_FILE=/charts/rke2-calico.yam
RUN CHART_VERSION="v1.0.006" CHART_FILE=/charts/rke2-calico-crd.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="1.10.101-build2021022304" CHART_FILE=/charts/rke2-coredns.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="3.30.003" CHART_FILE=/charts/rke2-ingress-nginx.yaml CHART_BOOTSTRAP=false /charts/build-chart.sh
RUN CHART_VERSION="v1.21.1-build2021052004" CHART_FILE=/charts/rke2-kube-proxy.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
# override the CHART_URL directly instead of constructing. See https://github.com/rancher/rancher/issues/33269
RUN CHART_URL="https://rke2-charts.rancher.io/assets/rke2-kube-proxy-1.21/rke2-kube-proxy-v1.21.2-build2021061701.tgz" \
CHART_FILE=/charts/rke2-kube-proxy.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="2.11.100-build2021022300" CHART_FILE=/charts/rke2-metrics-server.yaml CHART_BOOTSTRAP=false /charts/build-chart.sh
RUN CHART_VERSION="v3.7.1-build2021041602" CHART_FILE=/charts/rke2-multus.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="1.0.000" CHART_FILE=/charts/rancher-vsphere-cpi.yaml CHART_BOOTSTRAP=true CHART_REPO="https://charts.rancher.io" /charts/build-chart.sh
Expand All @@ -146,7 +148,7 @@ RUN rm -vf /charts/*.sh /charts/*.md
# This image includes any host level programs that we might need. All binaries
# must be placed in bin/ of the file image and subdirectories of bin/ will be flattened during installation.
# This means bin/foo/bar will become bin/bar when rke2 installs this to the host
FROM rancher/k3s:v1.21.1-rc2-k3s1 AS k3s
FROM rancher/k3s:v1.21.2-rc1-k3s1 AS k3s
FROM rancher/hardened-containerd:v1.4.4-k3s2-build20210520 AS containerd
FROM rancher/hardened-crictl:v1.19.0-build20210223 AS crictl
FROM rancher/hardened-runc:v1.0.0-rc95-build20210519 AS runc
Expand Down
20 changes: 10 additions & 10 deletions developer-docs/upgrading_kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Create a PR in [rke2-charts](https://github.com/rancher/rke2-charts) that update

The following files have references that will need to be updated in the respective locations. Replace the found version with the desired version. There are also references in documentation that should be updated and kept in sync.

* Dockerfile: `RUN CHART_VERSION="v1.21.0-build2021041301" CHART_FILE=/charts/rke2-kube-proxy.yaml`
* Dockerfile: `FROM rancher/k3s:v1.21.0-k3s1 AS k3s`
* version.sh: `KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.21.0}`
* Dockerfile: `RUN CHART_VERSION="v1.21.2-build2021041301" CHART_FILE=/charts/rke2-kube-proxy.yaml`
* Dockerfile: `FROM rancher/k3s:v1.21.2-k3s1 AS k3s`
* version.sh: `KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.21.2}`

Once these changes are made, submit a PR for review and let CI complete. When CI is finished and 2 approvals are had, merge the PR. CI will run for the master merge.

Expand All @@ -39,7 +39,7 @@ Next, we need to create a release candidate (RC).
* Click "Releases"
* Click "Draft new release"
* Enter the desired version into the "Tag version" box.
* Example tag: `v1.21.0-rc1+rke2r1`
* Example tag: `v1.21.2-rc1+rke2r1`

CI will run and build the release assets as well as kick off an image build for [RKE2 Upgrade images](https://hub.docker.com/r/rancher/rke2-upgrade/tags?page=1&ordering=last_updated).

Expand All @@ -52,7 +52,7 @@ Along with creating a new RKE2 release, we need to trigger a new build of the as
* Click "Releases"
* Click "Draft new release"
* Enter the desired version into the "Tag version" box.
* Example tag: `v1.21.0-rc1+rke2r1.testing.0`
* Example tag: `v1.21.2-rc1+rke2r1.testing.0`
* The first part of the tag here must match the tag created in the RKE2 repo.

When CI completes, let QA know so they can perform testing.
Expand All @@ -64,7 +64,7 @@ Once QA signs off on the RC, it's time to cut the primary release. Go to the [rk
* Click "Releases"
* Click "Draft new release"
* Enter the desired version into the "Tag version" box.
* Example tag: `v1.21.0+rke2r1`
* Example tag: `v1.21.2+rke2r1`

Leave the release as "prerelease". This will be unchecked as soon as CI completes successfully.

Expand All @@ -73,20 +73,20 @@ Once complete, the process is repeated in the [rke2-packaging](https://github.co
* Click "Releases"
* Click "Draft new release"
* Enter the desired version into the "Tag version" box.
* Example tag: `v1.21.0+rke2r1.testing.0`
* Example tag: `v1.21.2+rke2r1.testing.0`
* The first part of the tag here must match the tag created in the RKE2 repo.

Make sure that CI passes. This is for RPM availability in the testing channel.

Once complete, perform the steps above again however this time, use the tag "latest" tag. E.g. `v1.21.0+rke2r1.latest.0`.
Once complete, perform the steps above again however this time, use the tag "latest" tag. E.g. `v1.21.2+rke2r1.latest.0`.

We choose "latest" here since we want to wait at least 24 hours in case the community finds an issue. Patches will need at least 24 hours. We'll then wait up to 7 days until marking the release as "stable".

### Updating Channel Server

After all of the builds are complete and QA has signed off on the release, we need to update the channel server. This is done by editing the `channels.yaml` file at the root of the [rke2](https://github.com/rancher/rke2) repository.

* Update the line: `latest: <release>` to be the recent release. e.g. `v1.21.0+rke2r1`.
* Update the line: `latest: <release>` to be the recent release. e.g. `v1.21.2+rke2r1`.
* Verify updated in the JSON output from a call [here](https://update.rke2.io/).

## Update Rancher KDM
Expand All @@ -100,4 +100,4 @@ This step is specific to Rancher and serves to update Rancher's [Kontainer Drive

### Promoting to Stable

After 24 hours, we'll promote the release to stable by updating the channel server's config as we did at above, however this time changing "latest" to "stable". We need to do the same thing for RPM's too. This involves the same steps for RPM releases but changing "latest" to "stable" in the release name. E.g. `v1.21.0+rke2r1.stable.0`.
After 24 hours, we'll promote the release to stable by updating the channel server's config as we did at above, however this time changing "latest" to "stable". We need to do the same thing for RPM's too. This involves the same steps for RPM releases but changing "latest" to "stable" in the release name. E.g. `v1.21.2+rke2r1.stable.0`.
2 changes: 1 addition & 1 deletion scripts/build-images
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ xargs -n1 -t docker image pull --quiet << EOF >> build/images-core.txt
${REGISTRY}/rancher/hardened-coredns:v1.6.9-${IMAGE_BUILD_VERSION}
${REGISTRY}/rancher/hardened-etcd:${ETCD_VERSION}-${IMAGE_BUILD_VERSION}
${REGISTRY}/rancher/hardened-k8s-metrics-server:v0.3.6-${IMAGE_BUILD_VERSION}
${REGISTRY}/rancher/hardened-kube-proxy:${KUBERNETES_VERSION}-build20210520
${REGISTRY}/rancher/hardened-kube-proxy:${KUBERNETES_VERSION}-build20210617
${REGISTRY}/rancher/klipper-helm:v0.6.1-build20210616
${REGISTRY}/rancher/pause:${PAUSE_VERSION}
${REGISTRY}/rancher/mirrored-jettech-kube-webhook-certgen:v1.5.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code;
PLATFORM=${GOOS}-${GOARCH}
RELEASE=${PROG}.${PLATFORM}
# hardcode versions unless set specifically
KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.21.1}
KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.21.2}
ETCD_VERSION=${ETCD_VERSION:-v3.4.13-k3s1}
PAUSE_VERSION=${PAUSE_VERSION:-3.2}
IMAGE_BUILD_VERSION=${IMAGE_BUILD_VERSION:-build20210223}
Expand Down

0 comments on commit 2081963

Please sign in to comment.