Skip to content

Commit

Permalink
✨ Upgrade to Kubernetes 1.28
Browse files Browse the repository at this point in the history
  • Loading branch information
guettli committed Dec 6, 2023
1 parent 08f9d77 commit e4ef10b
Show file tree
Hide file tree
Showing 1,320 changed files with 93,645 additions and 33,191 deletions.
2 changes: 1 addition & 1 deletion .envrc.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export HCLOUD_SSH_KEY=test
export HCLOUD_REGION=fsn1
export CONTROL_PLANE_MACHINE_COUNT=1
export WORKER_MACHINE_COUNT=1
export KUBERNETES_VERSION=v1.25.2
export KUBERNETES_VERSION=v1.28.4
export HCLOUD_IMAGE_NAME=1.23.4-ubuntu-20.04-containerd
export HCLOUD_CONTROL_PLANE_MACHINE_TYPE=cpx31
export HCLOUD_WORKER_MACHINE_TYPE=cpx31
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ test-e2e-feature: $(E2E_CONF_FILE) $(if $(SKIP_IMAGE_BUILD),,e2e-image) $(ARTIFA

.PHONY: test-e2e-feature-packer
test-e2e-feature-packer: $(if $(SKIP_IMAGE_BUILD),,e2e-image) $(ARTIFACTS)
GINKGO_FOKUS="'\[Feature Packer\]'" GINKGO_NODES=1 PACKER_IMAGE_NAME=templates/node-image/1.25.2-ubuntu-22-04-containerd ./hack/ci-e2e-capi.sh
GINKGO_FOKUS="'\[Feature Packer\]'" GINKGO_NODES=1 PACKER_IMAGE_NAME=templates/node-image/1.28.4-ubuntu-22-04-containerd ./hack/ci-e2e-capi.sh

.PHONY: test-e2e-lifecycle
test-e2e-lifecycle: $(E2E_CONF_FILE) $(if $(SKIP_IMAGE_BUILD),,e2e-image) $(ARTIFACTS)
Expand All @@ -506,7 +506,7 @@ test-e2e-upgrade-$(INFRA_SHORT): $(E2E_CONF_FILE) $(if $(SKIP_IMAGE_BUILD),,e2e-

.PHONY: test-e2e-upgrade-kubernetes
test-e2e-upgrade-kubernetes: $(if $(SKIP_IMAGE_BUILD),,e2e-image) $(ARTIFACTS)
GINKGO_FOKUS="'\[Upgrade Kubernetes\]'" GINKGO_NODES=2 PACKER_KUBERNETES_UPGRADE_FROM=templates/node-image/1.24.1-ubuntu-20-04-containerd PACKER_KUBERNETES_UPGRADE_TO=templates/node-image/1.25.2-ubuntu-22-04-containerd ./hack/ci-e2e-capi.sh
GINKGO_FOKUS="'\[Upgrade Kubernetes\]'" GINKGO_NODES=2 PACKER_KUBERNETES_UPGRADE_FROM=templates/node-image/1.27.8-ubuntu-22-04-containerd PACKER_KUBERNETES_UPGRADE_TO=templates/node-image/1.28.4-ubuntu-22-04-containerd ./hack/ci-e2e-capi.sh

.PHONY: test-e2e-conformance
test-e2e-conformance: $(E2E_CONF_FILE) $(if $(SKIP_IMAGE_BUILD),,e2e-image) $(ARTIFACTS)
Expand Down Expand Up @@ -689,7 +689,7 @@ ifeq ($(BUILD_IN_CONTAINER),true)
else
go version
golangci-lint version
golangci-lint run -v --out-format=github-actions
golangci-lint run --out-format=github-actions
endif

.PHONY: lint-yaml
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ This provider's versions can install and manage the following versions of Kubern
| Kubernetes 1.25.x ||
| Kubernetes 1.26.x ||
| Kubernetes 1.27.x ||
| Kubernetes 1.28.x ||

Test status:

Expand Down
5 changes: 2 additions & 3 deletions controllers/hetznercluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,8 @@ func (r *HetznerClusterReconciler) newTargetClusterManager(ctx context.Context,
clusterMgr, err := ctrl.NewManager(
restConfig,
ctrl.Options{
Scheme: scheme,
MetricsBindAddress: "0",
LeaderElection: false,
Scheme: scheme,
LeaderElection: false,
},
)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ You need to create a ```tilt-settings.json``` file and specify the values you ne
"HCLOUD_REGION": "fsn1",
"CONTROL_PLANE_MACHINE_COUNT": "3",
"WORKER_MACHINE_COUNT": "3",
"KUBERNETES_VERSION": "v1.25.2",
"HCLOUD_IMAGE_NAME": "1.25.2-ubuntu-20.04-containerd",
"KUBERNETES_VERSION": "v1.28.4",
"HCLOUD_IMAGE_NAME": "1.28.4-ubuntu-22-04-containerd",
"HCLOUD_CONTROL_PLANE_MACHINE_TYPE": "cpx31",
"HCLOUD_WORKER_MACHINE_TYPE": "cpx31",
"CLUSTER_NAME": "testing",
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/tilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"HCLOUD_REGION": "fsn1",
"CONTROL_PLANE_MACHINE_COUNT": "3",
"WORKER_MACHINE_COUNT": "3",
"KUBERNETES_VERSION": "v1.25.2",
"KUBERNETES_VERSION": "v1.28.4",
"HCLOUD_IMAGE_NAME": "test-image",
"HCLOUD_CONTROL_PLANE_MACHINE_TYPE": "cpx31",
"HCLOUD_WORKER_MACHINE_TYPE": "cpx31",
Expand All @@ -42,7 +42,7 @@
"HCLOUD_REGION": "fsn1",
"CONTROL_PLANE_MACHINE_COUNT": "3",
"WORKER_MACHINE_COUNT": "3",
"KUBERNETES_VERSION": "v1.25.2",
"KUBERNETES_VERSION": "v1.28.4",
"HCLOUD_IMAGE_NAME": "test-image",
"HCLOUD_CONTROL_PLANE_MACHINE_TYPE": "cpx31",
"HCLOUD_WORKER_MACHINE_TYPE": "cpx31",
Expand Down
6 changes: 3 additions & 3 deletions docs/topics/node-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ In this repo is also an example packer node-image. To use it do the following:
export HCLOUD_TOKEN=<your-token>

## Only build
packer build templates/node-image/1.25.2-ubuntu-22-04-containerd/image.json
packer build templates/node-image/1.28.4-ubuntu-22-04-containerd/image.json

## Debug and ability to ssh into the created server
packer build --debug --on-error=abort templates/node-image/1.25.2-ubuntu-22-04-containerd/image.json
packer build --debug --on-error=abort templates/node-image/1.28.4-ubuntu-22-04-containerd/image.json
```

The first command is necessary so that packer is able to create a server in hcloud.
The second one creates the server with packer. If you are developing your own packer image the third command could be helpful to check what's going wrong.

It's very important to know that if you create your own packer image you need to set a label so that CAPH is able to find the specified image name. We use for this label the following key: `caph-image-name`
Please have a look into the image.json of the [example node-image](/templates/node-image/1.25.2-ubuntu-22-04-containerd/image.json).
Please have a look into the image.json of the [example node-image](/templates/node-image/1.28.4-ubuntu-22-04-containerd/image.json).

If you use your own node image, make sure to also use a cluster flavor that has `packer` in its name. The default one use preKubeadm commands to install all necessary things. This is very helpful for testing but is not recommended in a production system.
2 changes: 1 addition & 1 deletion docs/topics/preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export CLUSTER_NAME="my-cluster" \
export HCLOUD_REGION="fsn1" \
export CONTROL_PLANE_MACHINE_COUNT=3 \
export WORKER_MACHINE_COUNT=3 \
export KUBERNETES_VERSION=1.25.2 \
export KUBERNETES_VERSION=1.28.4 \
export HCLOUD_CONTROL_PLANE_MACHINE_TYPE=cpx31 \
export HCLOUD_WORKER_MACHINE_TYPE=cpx31
```
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ It generates a YAML file named `my-cluster.yaml` with a predefined list of Clust
See also `clusterctl generate cluster --help`.

```shell
clusterctl generate cluster my-cluster --kubernetes-version v1.25.2 --control-plane-machine-count=3 --worker-machine-count=3 > my-cluster.yaml
clusterctl generate cluster my-cluster --kubernetes-version v1.28.4 --control-plane-machine-count=3 --worker-machine-count=3 > my-cluster.yaml
```

You can also use different flavors, e.g. to create a cluster with private network:

```shell
clusterctl generate cluster my-cluster --kubernetes-version v1.25.2 --control-plane-machine-count=3 --worker-machine-count=3 --flavor hcloud-network > my-cluster.yaml
clusterctl generate cluster my-cluster --kubernetes-version v1.28.4 --control-plane-machine-count=3 --worker-machine-count=3 --flavor hcloud-network > my-cluster.yaml
```

All pre-configured flavors can be found on the [release page](https://github.com/syself/cluster-api-provider-hetzner/releases). The cluster-templates start with `cluster-template-`. The flavor name is the suffix.
Expand Down
85 changes: 44 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module github.com/syself/cluster-api-provider-hetzner

go 1.21

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.5.3

require (
github.com/blang/semver/v4 v4.0.0
github.com/go-logr/logr v1.3.0
Expand All @@ -18,16 +16,16 @@ require (
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.16.0
golang.org/x/mod v0.14.0
k8s.io/api v0.27.7
k8s.io/apimachinery v0.27.7
k8s.io/apiserver v0.27.7
k8s.io/client-go v0.27.7
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/apiserver v0.28.4
k8s.io/client-go v0.28.4
k8s.io/klog/v2 v2.110.1
k8s.io/kubectl v0.27.7
k8s.io/kubectl v0.28.4
k8s.io/utils v0.0.0-20231127182322-b307cd553661
sigs.k8s.io/cluster-api v1.5.3
sigs.k8s.io/cluster-api/test v1.5.0
sigs.k8s.io/controller-runtime v0.15.3
sigs.k8s.io/cluster-api v1.6.0
sigs.k8s.io/cluster-api/test v1.6.0
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/kind v0.20.0
)

Expand All @@ -38,42 +36,42 @@ require (
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/adrg/xdg v0.4.0 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/coredns/caddy v1.1.0 // indirect
github.com/coredns/corefile-migration v1.0.21 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/cel-go v0.12.7 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/cel-go v0.16.1 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v48 v48.2.0 // indirect
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.13 // indirect
Expand All @@ -82,7 +80,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand All @@ -93,43 +91,48 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/viper v1.17.0 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.27.7 // indirect
k8s.io/cluster-bootstrap v0.27.2 // indirect
k8s.io/component-base v0.27.7 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/apiextensions-apiserver v0.28.4 // indirect
k8s.io/cluster-bootstrap v0.28.4 // indirect
k8s.io/component-base v0.28.4 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit e4ef10b

Please sign in to comment.