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

feat: update Kubernetes to 1.21.0-beta.0 #3328

Merged
merged 1 commit into from
Mar 24, 2021
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ OPERATING_SYSTEM := $(shell uname -s | tr "[:upper:]" "[:lower:]")
TALOSCTL_DEFAULT_TARGET := talosctl-$(OPERATING_SYSTEM)
INTEGRATION_TEST_DEFAULT_TARGET := integration-test-$(OPERATING_SYSTEM)
INTEGRATION_TEST_PROVISION_DEFAULT_TARGET := integration-test-provision-$(OPERATING_SYSTEM)
KUBECTL_URL ?= https://storage.googleapis.com/kubernetes-release/release/v1.20.5/bin/$(OPERATING_SYSTEM)/amd64/kubectl
KUBECTL_URL ?= https://storage.googleapis.com/kubernetes-release/release/v1.21.0-beta.0/bin/$(OPERATING_SYSTEM)/amd64/kubectl
CLUSTERCTL_VERSION ?= 0.3.14
CLUSTERCTL_URL ?= https://github.com/kubernetes-sigs/cluster-api/releases/download/v$(CLUSTERCTL_VERSION)/clusterctl-$(OPERATING_SYSTEM)-amd64
SONOBUOY_VERSION ?= 0.50.0
SONOBUOY_URL ?= https://github.com/vmware-tanzu/sonobuoy/releases/download/v$(SONOBUOY_VERSION)/sonobuoy_$(SONOBUOY_VERSION)_$(OPERATING_SYSTEM)_amd64.tar.gz
TESTPKGS ?= github.com/talos-systems/talos/...
RELEASES ?= v0.8.4 v0.9.0-alpha.5
RELEASES ?= v0.8.5 v0.9.0
SHORT_INTEGRATION_TEST ?=
CUSTOM_CNI_URL ?=

Expand Down
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ require (
go.etcd.io/etcd/api/v3 v3.5.0-alpha.0
go.etcd.io/etcd/client/v3 v3.5.0-alpha.0
go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210301091718-77cc2087c03b
Expand All @@ -96,11 +95,11 @@ require (
gopkg.in/freddierice/go-losetup.v1 v1.0.0-20170407175016-fc9adea44124
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
honnef.co/go/tools v0.1.2 // indirect
k8s.io/api v0.20.5
k8s.io/apimachinery v0.20.5
k8s.io/apiserver v0.20.5 // indirect
k8s.io/client-go v0.20.5
k8s.io/cri-api v0.20.5
k8s.io/kubectl v0.20.5
k8s.io/kubelet v0.20.5
k8s.io/api v0.21.0-beta.0
k8s.io/apimachinery v0.21.0-beta.0
k8s.io/apiserver v0.21.0-beta.0 // indirect
k8s.io/client-go v0.21.0-beta.0
k8s.io/cri-api v0.21.0-beta.0
k8s.io/kubectl v0.21.0-beta.0
k8s.io/kubelet v0.21.0-beta.0
)
75 changes: 39 additions & 36 deletions go.sum

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion hack/test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# - CUSTOM_CNI_URL
# - IMAGE
# - INSTALLER_IMAGE
#
# Some environment variables set in this file (e. g. TALOS_VERSION and K8S_VERSION)
# are referenced by https://github.com/talos-systems/cluster-api-templates.
# See other e2e-*.sh scripts.

set -eoux pipefail

Expand All @@ -27,7 +31,7 @@ export TALOS_VERSION=v0.9
# Kubernetes

export KUBECONFIG="${TMP}/kubeconfig"
export K8S_VERSION=1.20.5
AlekSi marked this conversation as resolved.
Show resolved Hide resolved
export K8S_VERSION=1.21.0-beta.0

# Sonobuoy

Expand Down
41 changes: 21 additions & 20 deletions internal/integration/provision/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,19 @@ type upgradeSpec struct {
}

const (
previousRelease = "v0.8.4"
stableRelease = "v0.9.0-alpha.5"
previousRelease = "v0.8.5"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update versions in Makefile RELEASES variable to match these (so that required artifacts are downloaded)

stableRelease = "v0.9.0" // or soon-to-be-stable
// The current version (the one being built on CI) is DefaultSettings.CurrentVersion.

previousK8sVersion = "1.20.1"
stableK8sVersion = "1.20.4"
currentK8sVersion = "1.20.5"
previousK8sVersion = "1.20.1" // constants.DefaultKubernetesVersion in the previousRelease
stableK8sVersion = "1.20.5" // constants.DefaultKubernetesVersion in the stableRelease
currentK8sVersion = "1.21.0-beta.0" // next k8s version being tested
)

var defaultNameservers = []net.IP{net.ParseIP("8.8.8.8"), net.ParseIP("1.1.1.1")}

// upgradeBetweenTwoLastReleases upgrades between two last releases of Talos.
func upgradeBetweenTwoLastReleases() upgradeSpec {
// upgradePreviousToStable upgrades from the previous Talos release to the stable release.
func upgradePreviousToStable() upgradeSpec {
return upgradeSpec{
ShortName: fmt.Sprintf("%s-%s", previousRelease, stableRelease),

Expand All @@ -102,8 +103,8 @@ func upgradeBetweenTwoLastReleases() upgradeSpec {
}
}

// upgradeStableReleaseToCurrent upgrades last release to the current version of Talos.
func upgradeStableReleaseToCurrent() upgradeSpec {
// upgradeStableToCurrent upgrades from the stable Talos release to the current version.
func upgradeStableToCurrent() upgradeSpec {
return upgradeSpec{
ShortName: fmt.Sprintf("%s-%s", stableRelease, DefaultSettings.CurrentVersion),

Expand All @@ -122,8 +123,8 @@ func upgradeStableReleaseToCurrent() upgradeSpec {
}
}

// upgradeCurrentReleaseToCurrent upgrades current version to the current version of Talos.
func upgradeCurrentReleaseToCurrent() upgradeSpec {
// upgradeCurrentToCurrent upgrades the current version to itself.
func upgradeCurrentToCurrent() upgradeSpec {
installerImage := fmt.Sprintf("%s/%s:%s", DefaultSettings.TargetInstallImageRegistry, images.DefaultInstallerImageName, DefaultSettings.CurrentVersion)

return upgradeSpec{
Expand All @@ -146,8 +147,8 @@ func upgradeCurrentReleaseToCurrent() upgradeSpec {
}
}

// upgradeSingeNodePreserve upgrade last release of Talos to the current version of Talos for single-node cluster with preserve.
func upgradeSingeNodePreserve() upgradeSpec {
// upgradeStableToCurrentPreserve upgrades from the stable Talos release to the current version for single-node cluster with preserve.
func upgradeStableToCurrentPreserve() upgradeSpec {
return upgradeSpec{
ShortName: fmt.Sprintf("prsrv-%s-%s", stableRelease, DefaultSettings.CurrentVersion),

Expand All @@ -167,8 +168,8 @@ func upgradeSingeNodePreserve() upgradeSpec {
}
}

// upgradeSingeNodeStage upgrade last release of Talos to the current version of Talos for single-node cluster with preserve and stage.
func upgradeSingeNodeStage() upgradeSpec {
// upgradeStableToCurrentPreserveStage upgrades from the stable Talos release to the current version for single-node cluster with preserve and stage.
func upgradeStableToCurrentPreserveStage() upgradeSpec {
return upgradeSpec{
ShortName: fmt.Sprintf("prsrv-stg-%s-%s", stableRelease, DefaultSettings.CurrentVersion),

Expand Down Expand Up @@ -686,10 +687,10 @@ func (suite *UpgradeSuite) SuiteName() string {

func init() {
allSuites = append(allSuites,
&UpgradeSuite{specGen: upgradeBetweenTwoLastReleases, track: 0},
&UpgradeSuite{specGen: upgradeStableReleaseToCurrent, track: 1},
&UpgradeSuite{specGen: upgradeCurrentReleaseToCurrent, track: 2},
&UpgradeSuite{specGen: upgradeSingeNodePreserve, track: 0},
&UpgradeSuite{specGen: upgradeSingeNodeStage, track: 1},
&UpgradeSuite{specGen: upgradePreviousToStable, track: 0},
&UpgradeSuite{specGen: upgradeStableToCurrent, track: 1},
&UpgradeSuite{specGen: upgradeCurrentToCurrent, track: 2},
&UpgradeSuite{specGen: upgradeStableToCurrentPreserve, track: 0},
&UpgradeSuite{specGen: upgradeStableToCurrentPreserveStage, track: 1},
)
}
2 changes: 1 addition & 1 deletion pkg/machinery/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const (
SystemKubeletPKIDir = "/system/secrets/kubelet"

// DefaultKubernetesVersion is the default target version of the control plane.
DefaultKubernetesVersion = "1.20.5"
DefaultKubernetesVersion = "1.21.0-beta.0"

// DefaultControlPlanePort is the default port to use for the control plane.
DefaultControlPlanePort = 6443
Expand Down
4 changes: 2 additions & 2 deletions website/content/docs/v0.10/Reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ talosctl cluster create [flags]
--ipv4 enable IPv4 network in the cluster (default true)
--ipv6 enable IPv6 network in the cluster (QEMU provisioner only)
--iso-path string the ISO path to use for the initial boot (VM only)
--kubernetes-version string desired kubernetes version to run (default "1.20.5")
--kubernetes-version string desired kubernetes version to run (default "1.21.0-beta.0")
--masters int the number of masters to create (default 1)
--memory int the limit on memory usage in MB (each container/VM) (default 2048)
--mtu int MTU of the cluster network (default 1500)
Expand Down Expand Up @@ -1915,7 +1915,7 @@ talosctl upgrade-k8s [flags]
--endpoint string the cluster control plane endpoint
--from string the Kubernetes control plane version to upgrade from
-h, --help help for upgrade-k8s
--to string the Kubernetes control plane version to upgrade to (default "1.20.5")
--to string the Kubernetes control plane version to upgrade to (default "1.21.0-beta.0")
```

### Options inherited from parent commands
Expand Down
30 changes: 15 additions & 15 deletions website/content/docs/v0.10/Reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Examples:

``` yaml
kubelet:
image: ghcr.io/talos-systems/kubelet:v1.20.5 # The `image` field is an optional reference to an alternative kubelet image.
image: ghcr.io/talos-systems/kubelet:v1.21.0-beta.0 # The `image` field is an optional reference to an alternative kubelet image.
# The `extraArgs` field is used to provide additional flags to the kubelet.
extraArgs:
feature-gates: ServerSideApply=true
Expand Down Expand Up @@ -948,7 +948,7 @@ Examples:

``` yaml
apiServer:
image: k8s.gcr.io/kube-apiserver:v1.20.5 # The container image used in the API server manifest.
image: k8s.gcr.io/kube-apiserver:v1.21.0-beta.0 # The container image used in the API server manifest.
# Extra arguments to supply to the API server.
extraArgs:
feature-gates: ServerSideApply=true
Expand Down Expand Up @@ -980,7 +980,7 @@ Examples:

``` yaml
controllerManager:
image: k8s.gcr.io/kube-controller-manager:v1.20.5 # The container image used in the controller manager manifest.
image: k8s.gcr.io/kube-controller-manager:v1.21.0-beta.0 # The container image used in the controller manager manifest.
# Extra arguments to supply to the controller manager.
extraArgs:
feature-gates: ServerSideApply=true
Expand All @@ -1007,7 +1007,7 @@ Examples:

``` yaml
proxy:
image: k8s.gcr.io/kube-proxy:v1.20.5 # The container image used in the kube-proxy manifest.
image: k8s.gcr.io/kube-proxy:v1.21.0-beta.0 # The container image used in the kube-proxy manifest.
mode: ipvs # proxy mode of kube-proxy.
# Extra arguments to supply to kube-proxy.
extraArgs:
Expand Down Expand Up @@ -1035,7 +1035,7 @@ Examples:

``` yaml
scheduler:
image: k8s.gcr.io/kube-scheduler:v1.20.5 # The container image used in the scheduler manifest.
image: k8s.gcr.io/kube-scheduler:v1.21.0-beta.0 # The container image used in the scheduler manifest.
# Extra arguments to supply to the scheduler.
extraArgs:
feature-gates: AllBeta=true
Expand Down Expand Up @@ -1239,7 +1239,7 @@ Appears in:


``` yaml
image: ghcr.io/talos-systems/kubelet:v1.20.5 # The `image` field is an optional reference to an alternative kubelet image.
image: ghcr.io/talos-systems/kubelet:v1.21.0-beta.0 # The `image` field is an optional reference to an alternative kubelet image.
# The `extraArgs` field is used to provide additional flags to the kubelet.
extraArgs:
feature-gates: ServerSideApply=true
Expand Down Expand Up @@ -1271,7 +1271,7 @@ Examples:


``` yaml
image: ghcr.io/talos-systems/kubelet:v1.20.5
image: ghcr.io/talos-systems/kubelet:v1.21.0-beta.0
```


Expand Down Expand Up @@ -2269,7 +2269,7 @@ Appears in:


``` yaml
image: k8s.gcr.io/kube-apiserver:v1.20.5 # The container image used in the API server manifest.
image: k8s.gcr.io/kube-apiserver:v1.21.0-beta.0 # The container image used in the API server manifest.
# Extra arguments to supply to the API server.
extraArgs:
feature-gates: ServerSideApply=true
Expand Down Expand Up @@ -2297,7 +2297,7 @@ Examples:


``` yaml
image: k8s.gcr.io/kube-apiserver:v1.20.5
image: k8s.gcr.io/kube-apiserver:v1.21.0-beta.0
```


Expand Down Expand Up @@ -2358,7 +2358,7 @@ Appears in:


``` yaml
image: k8s.gcr.io/kube-controller-manager:v1.20.5 # The container image used in the controller manager manifest.
image: k8s.gcr.io/kube-controller-manager:v1.21.0-beta.0 # The container image used in the controller manager manifest.
# Extra arguments to supply to the controller manager.
extraArgs:
feature-gates: ServerSideApply=true
Expand All @@ -2381,7 +2381,7 @@ Examples:


``` yaml
image: k8s.gcr.io/kube-controller-manager:v1.20.5
image: k8s.gcr.io/kube-controller-manager:v1.21.0-beta.0
```


Expand Down Expand Up @@ -2429,7 +2429,7 @@ Appears in:


``` yaml
image: k8s.gcr.io/kube-proxy:v1.20.5 # The container image used in the kube-proxy manifest.
image: k8s.gcr.io/kube-proxy:v1.21.0-beta.0 # The container image used in the kube-proxy manifest.
mode: ipvs # proxy mode of kube-proxy.
# Extra arguments to supply to kube-proxy.
extraArgs:
Expand Down Expand Up @@ -2476,7 +2476,7 @@ Examples:


``` yaml
image: k8s.gcr.io/kube-proxy:v1.20.5
image: k8s.gcr.io/kube-proxy:v1.21.0-beta.0
```


Expand Down Expand Up @@ -2525,7 +2525,7 @@ Appears in:


``` yaml
image: k8s.gcr.io/kube-scheduler:v1.20.5 # The container image used in the scheduler manifest.
image: k8s.gcr.io/kube-scheduler:v1.21.0-beta.0 # The container image used in the scheduler manifest.
# Extra arguments to supply to the scheduler.
extraArgs:
feature-gates: AllBeta=true
Expand All @@ -2548,7 +2548,7 @@ Examples:


``` yaml
image: k8s.gcr.io/kube-scheduler:v1.20.5
image: k8s.gcr.io/kube-scheduler:v1.21.0-beta.0
```


Expand Down