Skip to content

Commit

Permalink
Use Kubernetes 1.25 in Quick Start docs and CAPD.
Browse files Browse the repository at this point in the history
Use kind 0.15.0 and Calico 3.24.1 in the Quick Start.
  • Loading branch information
oscr committed Sep 2, 2022
1 parent 7e772e2 commit 9da40de
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@ _releasenotes
# Used during parts of the build process. Files _should_ get cleaned up automatically.
# This is also a good location for any temporary manfiests used during development
tmp

# asdf
.tool-versions
2 changes: 1 addition & 1 deletion docs/book/src/developer/providers/v1.2-to-v1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ maintainers of providers and consumers of our Go API.
**Note**: Only the most relevant dependencies are listed, `k8s.io/` and `ginkgo`/`gomega` dependencies
in Cluster API are kept in sync with the versions used by `sigs.k8s.io/controller-runtime`.

-
- sigs.k8s.io/kind: v0.14.x => v0.15.x

## Changes by Kind

Expand Down
21 changes: 14 additions & 7 deletions docs/book/src/user/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ a target [management cluster] on the selected [infrastructure provider].

[kind] is not designed for production use.

**Minimum [kind] supported version**: v0.14.0
**Minimum [kind] supported version**: v0.15.0

**Help with common issues can be found in the [Troubleshooting Guide](./troubleshooting.md).**

Expand Down Expand Up @@ -948,7 +948,7 @@ The Docker provider is not designed for production use and is intended for devel
```bash
clusterctl generate cluster capi-quickstart --flavor development \
--kubernetes-version v1.24.0 \
--kubernetes-version v1.25.0 \
--control-plane-machine-count=3 \
--worker-machine-count=3 \
> capi-quickstart.yaml
Expand All @@ -960,7 +960,7 @@ clusterctl generate cluster capi-quickstart --flavor development \
```bash
export CLUSTER_NAME=kind
export CLUSTER_NAMESPACE=vcluster
export KUBERNETES_VERSION=1.23.4
export KUBERNETES_VERSION=1.25.0
export HELM_VALUES="service:\n type: NodePort"
kubectl create namespace ${CLUSTER_NAMESPACE}
Expand All @@ -975,7 +975,7 @@ clusterctl generate cluster ${CLUSTER_NAME} \
```bash
clusterctl generate cluster capi-quickstart \
--kubernetes-version v1.24.0 \
--kubernetes-version v1.25.0 \
--control-plane-machine-count=3 \
--worker-machine-count=3 \
> capi-quickstart.yaml
Expand Down Expand Up @@ -1034,8 +1034,8 @@ kubectl get kubeadmcontrolplane
You should see an output is similar to this:
```bash
NAME INITIALIZED API SERVER AVAILABLE VERSION REPLICAS READY UPDATED UNAVAILABLE
capi-quickstart-control-plane true v1.24.0 3 3 3
NAME CLUSTER INITIALIZED API SERVER AVAILABLE REPLICAS READY UPDATED UNAVAILABLE AGE VERSION
capi-quickstart-g2trk capi-quickstart true 3 3 3 4m7s v1.25.0
```
<aside class="note warning">
Expand Down Expand Up @@ -1091,14 +1091,21 @@ Calico not required for vcluster.
```bash
kubectl --kubeconfig=./capi-quickstart.kubeconfig \
apply -f https://docs.projectcalico.org/v3.21/manifests/calico.yaml
apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/calico.yaml
```
After a short while, our nodes should be running and in `Ready` state,
let's check the status using `kubectl get nodes`:
```bash
kubectl --kubeconfig=./capi-quickstart.kubeconfig get nodes
NAME STATUS ROLES AGE VERSION
capi-quickstart-g2trk-9xrjv Ready control-plane 12m v1.25.0
capi-quickstart-g2trk-bmm9v Ready control-plane 11m v1.25.0
capi-quickstart-g2trk-hvs9q Ready control-plane 13m v1.25.0
capi-quickstart-md-0-55x6t-5649968bd7-8tq9v Ready <none> 12m v1.25.0
capi-quickstart-md-0-55x6t-5649968bd7-glnjd Ready <none> 12m v1.25.0
capi-quickstart-md-0-55x6t-5649968bd7-sfzp6 Ready <none> 12m v1.25.0
```
{{#/tab }}
Expand Down
2 changes: 1 addition & 1 deletion hack/ensure-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -o pipefail
set -x

GOPATH_BIN="$(go env GOPATH)/bin/"
MINIMUM_KIND_VERSION=v0.14.0
MINIMUM_KIND_VERSION=v0.15.0
goarch="$(go env GOARCH)"
goos="$(go env GOOS)"

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/cluster_upgrade_runtimesdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var _ = Describe("When upgrading a workload cluster using ClusterClass with Runt
// TODO: We can remove this after the v1.25 release as we then only test the v1.24=>v1.25 upgrade.
version, err := semver.ParseTolerant(e2eConfig.GetVariable(KubernetesVersionUpgradeFrom))
Expect(err).ToNot(HaveOccurred(), "Invalid argument, KUBERNETES_VERSION_UPGRADE_FROM is not a valid version")
if version.LT(semver.MustParse("1.24.0")) {
if version.LT(semver.MustParse("1.25.0")) {
// "upgrades-cgroupfs" is the same as the "topology" flavor but with an additional MachinePool
// with pinned cgroupDriver to cgroupfs.
flavor = pointer.String("upgrades-runtimesdk-cgroupfs")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/cluster_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var _ = Describe("When upgrading a workload cluster using ClusterClass and testi
// or MachinePools are supported in ClusterClass.
version, err := semver.ParseTolerant(e2eConfig.GetVariable(KubernetesVersionUpgradeFrom))
Expect(err).ToNot(HaveOccurred(), "Invalid argument, KUBERNETES_VERSION_UPGRADE_FROM is not a valid version")
if version.LT(semver.MustParse("1.24.0")) {
if version.LT(semver.MustParse("1.25.0")) {
// "upgrades-cgroupfs" is the same as the "topology" flavor but with an additional MachinePool
// with pinned cgroupDriver to cgroupfs.
flavor = pointer.String("upgrades-cgroupfs")
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/config/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ variables:
# allowing the same e2e config file to be re-used in different Prow jobs e.g. each one with a K8s version permutation.
# The following Kubernetes versions should be the latest versions with already published kindest/node images.
# This avoids building node images in the default case which improves the test duration significantly.
KUBERNETES_VERSION_MANAGEMENT: "v1.24.0"
KUBERNETES_VERSION: "v1.24.0"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.23.6"
KUBERNETES_VERSION_UPGRADE_TO: "v1.24.0"
KUBERNETES_VERSION_MANAGEMENT: "v1.25.0"
KUBERNETES_VERSION: "v1.25.0"
KUBERNETES_VERSION_UPGRADE_FROM: "v1.24.0"
KUBERNETES_VERSION_UPGRADE_TO: "v1.25.0"
ETCD_VERSION_UPGRADE_TO: "3.5.3-0"
COREDNS_VERSION_UPGRADE_TO: "v1.8.6"
DOCKER_SERVICE_DOMAIN: "cluster.local"
Expand All @@ -232,7 +232,7 @@ variables:
# NOTE: We test the latest release with a previous contract.
INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.7/clusterctl-{OS}-{ARCH}"
INIT_WITH_PROVIDERS_CONTRACT: "v1alpha4"
INIT_WITH_KUBERNETES_VERSION: "v1.24.0"
INIT_WITH_KUBERNETES_VERSION: "v1.25.0"

intervals:
default/wait-controllers: ["3m", "10s"]
Expand Down
2 changes: 1 addition & 1 deletion test/framework/bootstrap/kind_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
DefaultNodeImageRepository = "kindest/node"

// DefaultNodeImageVersion is the default Kubernetes version to be used for creating a kind cluster.
DefaultNodeImageVersion = "v1.24.0"
DefaultNodeImageVersion = "v1.25.0"
)

// KindClusterOption is a NewKindClusterProvider option.
Expand Down
2 changes: 1 addition & 1 deletion test/framework/machinepool_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func UpgradeMachinePoolAndWait(ctx context.Context, input UpgradeMachinePoolAndW
if mp.Spec.Template.Spec.InfrastructureRef.Kind == "DockerMachinePool" {
version, err := semver.ParseTolerant(input.UpgradeVersion)
Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("Failed to parse UpgradeVersion %q", input.UpgradeVersion))
if version.GTE(semver.MustParse("1.24.0")) && strings.HasSuffix(mp.Spec.Template.Spec.Bootstrap.ConfigRef.Name, "-cgroupfs") {
if version.GTE(semver.MustParse("1.25.0")) && strings.HasSuffix(mp.Spec.Template.Spec.Bootstrap.ConfigRef.Name, "-cgroupfs") {
mp.Spec.Template.Spec.Bootstrap.ConfigRef.Name = strings.TrimSuffix(mp.Spec.Template.Spec.Bootstrap.ConfigRef.Name, "-cgroupfs")
// We have to set DataSecretName to nil, so the secret of the new bootstrap ConfigRef gets picked up.
mp.Spec.Template.Spec.Bootstrap.DataSecretName = nil
Expand Down
2 changes: 1 addition & 1 deletion test/infrastructure/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ENV GOPROXY=$goproxy
# Gets additional CAPD dependencies
WORKDIR /tmp

RUN curl -LO https://dl.k8s.io/release/v1.24.0/bin/linux/${ARCH}/kubectl && \
RUN curl -LO https://dl.k8s.io/release/v1.25.0/bin/linux/${ARCH}/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/bin/kubectl

Expand Down
4 changes: 2 additions & 2 deletions test/infrastructure/docker/examples/machine-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
namespace: default
spec:
replicas: 1
version: v1.24.0
version: v1.25.0
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
Expand Down Expand Up @@ -80,7 +80,7 @@ spec:
replicas: 2
template:
spec:
version: v1.24.0
version: v1.25.0
clusterName: my-cluster
bootstrap:
configRef:
Expand Down
4 changes: 2 additions & 2 deletions test/infrastructure/docker/examples/simple-cluster-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
namespace: default
spec:
replicas: 1
version: v1.24.0
version: v1.25.0
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
Expand Down Expand Up @@ -90,7 +90,7 @@ spec:
cluster.x-k8s.io/cluster-name: my-cluster
template:
spec:
version: v1.24.0
version: v1.25.0
clusterName: my-cluster
bootstrap:
configRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ metadata:
name: controlplane-0
namespace: default
spec:
version: v1.24.0
version: v1.25.0
clusterName: my-cluster
bootstrap:
configRef:
Expand Down Expand Up @@ -80,7 +80,7 @@ spec:
cluster.x-k8s.io/cluster-name: my-cluster
template:
spec:
version: v1.24.0
version: v1.25.0
clusterName: my-cluster
bootstrap:
configRef:
Expand Down
4 changes: 2 additions & 2 deletions test/infrastructure/docker/examples/simple-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
namespace: default
spec:
replicas: 1
version: v1.24.0
version: v1.25.0
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
Expand Down Expand Up @@ -83,7 +83,7 @@ spec:
cluster.x-k8s.io/cluster-name: my-cluster
template:
spec:
version: v1.24.0
version: v1.25.0
clusterName: my-cluster
bootstrap:
configRef:
Expand Down
2 changes: 1 addition & 1 deletion test/infrastructure/docker/internal/docker/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import (

const (
defaultImageName = "kindest/node"
defaultImageTag = "v1.24.0"
defaultImageTag = "v1.25.0"
)

type nodeCreator interface {
Expand Down

0 comments on commit 9da40de

Please sign in to comment.