Unverified Commit 8ffe4bbf authored by crumohr's avatar crumohr Committed by GitHub
Browse files

rke2: refactor update-script and update rke2 channel versions (#344692)

parent 71a33cc7
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
# RKE2 Version

RKE2, Kubernetes, and other clustered software has the property of not being able to update atomically. Most software in nixpkgs, like for example bash, can be updated as part of a `nixos-rebuild switch` without having to worry about the old and the new bash interacting in some way.
RKE2, Kubernetes, and other clustered software has the property of not being able to update atomically.
Most software in nixpkgs, like for example bash, can be updated as part of a `nixos-rebuild switch`
without having to worry about the old and the new bash interacting in some way.

> [!NOTE]
> Upgrade the server nodes first, one at a time. Once all servers have been upgraded, you may then upgrade agent nodes.

## Release Channels

RKE2 has there own release channels, which are: `stable`, `latest` and `testing`.
RKE2 has three main release channels, which are: `stable`, `latest` and `testing`.

The `stable` channel is the default channel and is recommended for production use. The `latest` channel is the latest stable release. The `testing` channel is the latest release, including pre-releases.
The `stable` channel is the default channel and is recommended for production use.
The `latest` channel is the latest release.
The `testing` channel is the latest release, including pre-releases.

| Channel   | Description                                                                                                                                                                                    |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -19,7 +23,12 @@ The `stable` channel is the default channel and is recommended for production us

Learn more about the [RKE2 release channels](https://docs.rke2.io/upgrade/manual_upgrade).

For an exhaustive and up-to-date list of channels, you can visit the [rke2 channel service API](https://update.rke2.io/v1-release/channels). For more technical details on how channels work, you can see the [channelserver project](https://github.com/rancher/channelserver).
For an exhaustive and up-to-date list of channels, you can visit the
[rke2 channel service API](https://update.rke2.io/v1-release/channels).
For more technical details on how channels work, you can see the [channelserver project](https://github.com/rancher/channelserver).

> [!TIP]
> When attempting to upgrade to a new version of RKE2, the [Kubernetes version skew policy](https://kubernetes.io/docs/setup/release/version-skew-policy) applies. Ensure that your plan does not skip intermediate minor versions when upgrading. Nothing in the upgrade process will protect against unsupported changes to the Kubernetes version.
> When attempting to upgrade to a new version of RKE2,
> the [Kubernetes version skew policy](https://kubernetes.io/docs/setup/release/version-skew-policy) applies.
> Ensure that your plan **does not skip intermediate minor versions** when upgrading. Nothing in the upgrade process will
> protect you against unsupported changes to the Kubernetes version.
+8 −9
Original line number Diff line number Diff line
lib: { rke2Version, rke2RepoSha256, rke2VendorHash, updateScript
lib: { rke2Version, rke2Commit, rke2TarballHash, rke2VendorHash, updateScript
, k8sImageTag, etcdVersion, pauseVersion, ccmVersion, dockerizedVersion, ... }:

, rke2Commit, k8sImageTag, etcdVersion, pauseVersion, ccmVersion, dockerizedVersion, ... }:

{ lib, stdenv, buildGoModule, go, fetchgit, makeWrapper
# Build dependencies
{ lib, stdenv, buildGoModule, go, makeWrapper, fetchzip

# Runtime dependencies
, procps, coreutils, util-linux, ethtool, socat, iptables, bridge-utils, iproute2, kmod, lvm2
@@ -18,10 +18,9 @@ buildGoModule rec {
  pname = "rke2";
  version = rke2Version;

  src = fetchgit {
    url = "https://github.com/rancher/rke2.git";
    rev = "v${version}";
    sha256 = rke2RepoSha256;
  src = fetchzip {
    url = "https://github.com/rancher/rke2/archive/refs/tags/v${rke2Version}.tar.gz";
    hash = "${rke2TarballHash}";
  };

  vendorHash = rke2VendorHash;
@@ -52,7 +51,7 @@ buildGoModule rec {
    "-X github.com/k3s-io/k3s/pkg/version.Version=v${version}"
    "-X github.com/k3s-io/k3s/pkg/version.UpstreamGolang=go${go.version}"
    "-X github.com/rancher/rke2/pkg/images.DefaultRegistry=docker.io"
    "-X github.com/rancher/rke2/pkg/images.DefaultEtcdImage=rancher/hardened-etcd:${etcdVersion}-build20240418"
    "-X github.com/rancher/rke2/pkg/images.DefaultEtcdImage=rancher/hardened-etcd:${etcdVersion}"
    "-X github.com/rancher/rke2/pkg/images.DefaultKubernetesImage=rancher/hardened-kubernetes:${k8sImageTag}"
    "-X github.com/rancher/rke2/pkg/images.DefaultPauseImage=rancher/mirrored-pause:${pauseVersion}"
    "-X github.com/rancher/rke2/pkg/images.DefaultRuntimeImage=rancher/rke2-runtime:${dockerizedVersion}"
+10 −10
Original line number Diff line number Diff line
{
  rke2Version = "1.31.0+rke2r1";
  rke2RepoSha256 = "1xf7yhpfwiydhl31dd8wc2bhq0j470ad8vazjzzsl76skcy07rbc";
  rke2Commit = "4bf1156f41631dc0e81d66a6834a53d14b48aaef";
  rke2VendorHash = "sha256-/ALzC2fYYI+DbF+2TSNBiMy57T8wfXGPpdyKtbqdrtE=";
  k8sVersion = "v1.31.0";
  k8sImageTag = "v1.31.0-rke2r1-build20240815";
  etcdVersion = "v3.5.13-k3s1";
  rke2Version = "1.31.1+rke2r1";
  rke2Commit = "909d20d6a28cd7656b7177190f06f69f57927613";
  rke2TarballHash = "sha256-9ZryOX6QMNpjDtsOXLOVNPjCc6AMAa+XDLOn1EpyCcg=";
  rke2VendorHash = "sha256-7nWbWi4oJTOWZ5iZr9ptECDJJakPg4qZ7hW+tU7LBsI=";
  k8sVersion = "v1.31.1";
  k8sImageTag = "v1.31.1-rke2r1-build20240912";
  etcdVersion = "v3.5.13-k3s1-build20240910";
  pauseVersion = "3.6";
  ccmVersion = "v1.29.3-build20240515";
  dockerizedVersion = "v1.31.0-dev.";
  golangVersion = "go1.22.5";
  ccmVersion = "v1.31.0-build20240910";
  dockerizedVersion = "v1.31.1-rke2r1";
  golangVersion = "go1.22.6";
  eol = "2025-10-28";
}
+10 −10
Original line number Diff line number Diff line
{
  rke2Version = "1.30.4+rke2r1";
  rke2RepoSha256 = "1daxs8gxy775qn1yrf7zh77cyaj3nn3qlwj0vjqfpbv1gpkimfyi";
  rke2Commit = "9517eea519b780e154dd791c555c698e84a0e5cd";
  rke2VendorHash = "sha256-Q+Wt4Hyp6VyxfCXNsRQMyAo0QCGWhnY9tcV/NQrrSEY=";
  k8sVersion = "v1.30.4";
  k8sImageTag = "v1.30.4-rke2r1-build20240815";
  etcdVersion = "v3.5.13-k3s1";
  rke2Version = "1.30.5+rke2r1";
  rke2Commit = "0c83bc82315cd61664880d0b52a7e070e9fbd623";
  rke2TarballHash = "sha256-K5e7TNlL97PQ13IYnr4PSrXb4XaGJT9bPq55iWL0m1g=";
  rke2VendorHash = "sha256-QIcVyWnedKNF10OqJ2WmZqZeKA+8hvwDQ4Pl+WUOEJY=";
  k8sVersion = "v1.30.5";
  k8sImageTag = "v1.30.5-rke2r1-build20240912";
  etcdVersion = "v3.5.13-k3s1-build20240910";
  pauseVersion = "3.6";
  ccmVersion = "v1.29.3-build20240515";
  dockerizedVersion = "v1.30.4-dev.877838a0-dirty";
  golangVersion = "go1.22.5";
  ccmVersion = "v1.30.4-build20240910";
  dockerizedVersion = "v1.30.5-rke2r1";
  golangVersion = "go1.22.6";
  eol = "2025-06-28";
}
+3 −3
Original line number Diff line number Diff line
{
  rke2Version = "1.31.1-rc3+rke2r1";
  rke2RepoSha256 = "1j09f95d99xk1jbsy08cl1rw5y1ljnrmq3nv1rixlc4hgqwz56pm";
  rke2Commit = "909d20d6a28cd7656b7177190f06f69f57927613";
  rke2TarballHash = "sha256-9ZryOX6QMNpjDtsOXLOVNPjCc6AMAa+XDLOn1EpyCcg=";
  rke2VendorHash = "sha256-7nWbWi4oJTOWZ5iZr9ptECDJJakPg4qZ7hW+tU7LBsI=";
  k8sVersion = "v1.31.1";
  k8sImageTag = "v1.31.1-rke2r1-build20240912";
  etcdVersion = "v3.5.13-k3s1";
  etcdVersion = "v3.5.13-k3s1-build20240910";
  pauseVersion = "3.6";
  ccmVersion = "v1.31.0-build20240910";
  dockerizedVersion = "v1.31.1-dev.";
  dockerizedVersion = "v1.31.1-rc3-rke2r1";
  golangVersion = "go1.22.6";
  eol = "2025-10-28";
}
Loading