|
| 1 | +entries: |
| 2 | + - description: > |
| 3 | + For Go-based operators, upgrade the Go version from `1.23` to `1.24` |
| 4 | + kind: "change" |
| 5 | + breaking: true |
| 6 | + migration: |
| 7 | + header: Upgrade Go version to 1.24 |
| 8 | + body: | |
| 9 | + Update the Go version used to `1.24`. This affects: |
| 10 | +
|
| 11 | + **Dockerfile:** |
| 12 | + ```dockerfile |
| 13 | + -FROM golang:1.23 AS builder |
| 14 | + +FROM golang:1.24 AS builder |
| 15 | + ``` |
| 16 | +
|
| 17 | + **.devcontainer/devcontainer.json:** |
| 18 | + ```json |
| 19 | + - "image": "golang:1.23", |
| 20 | + + "image": "golang:1.24", |
| 21 | + ``` |
| 22 | +
|
| 23 | + **go.mod:** |
| 24 | + ```go |
| 25 | + -go 1.23.0 |
| 26 | + +go 1.24.0 |
| 27 | + ``` |
| 28 | +
|
| 29 | + - description: > |
| 30 | + For Go-based operators, upgrade golangci-lint to `v2.1.0` and update `.golangci.yml` |
| 31 | + to the v2 config format with enhanced structure and controls. |
| 32 | + kind: "change" |
| 33 | + breaking: false |
| 34 | + migration: |
| 35 | + header: Upgrade golangci-lint and use v2 config |
| 36 | + body: | |
| 37 | + Update golangci-lint usage across the project: |
| 38 | +
|
| 39 | + **Makefile:** |
| 40 | + ```makefile |
| 41 | + -GOLANGCI_LINT_VERSION ?= v1.63.4 |
| 42 | + +GOLANGCI_LINT_VERSION ?= v2.1.0 |
| 43 | +
|
| 44 | + -$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) |
| 45 | + +$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) |
| 46 | + ``` |
| 47 | +
|
| 48 | + **GitHub Actions Workflow:** |
| 49 | + ```yaml |
| 50 | + - uses: golangci/golangci-lint-action@v6 |
| 51 | + + uses: golangci/golangci-lint-action@v8 |
| 52 | + ``` |
| 53 | +
|
| 54 | + **.golangci.yml:** |
| 55 | + Convert to v2 layout with keys like `version`, `linters`, `settings`, `formatters`, `exclusions`. |
| 56 | + You might want to copy and paste the file from the Memcached sample from the tag release `v1.40.0`: [testdata/go/v4/memcached-operator/.golangci.yml](https://github.com/operator-framework/operator-sdk/tree/v1.40.0/testdata/go/v4/memcached-operator/.golangci.yml) |
| 57 | +
|
| 58 | + - description: > |
| 59 | + For Go-based operators, upgrade controller-gen from `v0.17.2` to `v0.18.0`. |
| 60 | + kind: "change" |
| 61 | + breaking: false |
| 62 | + migration: |
| 63 | + header: Upgrade controller-gen to `v0.18.0` |
| 64 | + body: | |
| 65 | + Update controller-gen tooling and annotations: |
| 66 | +
|
| 67 | + **Makefile:** |
| 68 | + ```makefile |
| 69 | + -CONTROLLER_TOOLS_VERSION ?= v0.17.2 |
| 70 | + +CONTROLLER_TOOLS_VERSION ?= v0.18.0 |
| 71 | + ``` |
| 72 | +
|
| 73 | + Run `make generate` to regenerate code and manifests with the new version. |
| 74 | +
|
| 75 | + - description: > |
| 76 | + For Go-based operators, upgrade controller-runtime from `v0.20.4` to `v0.21.0` |
| 77 | + and kubernetes dependencies to `v0.33`. |
| 78 | + kind: "change" |
| 79 | + breaking: false |
| 80 | + migration: |
| 81 | + header: Upgrade controller-runtime to `v0.21.0` |
| 82 | + body: | |
| 83 | + Update the `go.mod` import: |
| 84 | + ```go |
| 85 | + -sigs.k8s.io/controller-runtime v0.20.4 |
| 86 | + +sigs.k8s.io/controller-runtime v0.21.0 |
| 87 | + ``` |
| 88 | + |
| 89 | + Run `go mod tidy` to upgrade the k8s dependencies. |
| 90 | +
|
| 91 | + - description: > |
| 92 | + For Go-based operators, add new target to setup/teardown Kind cluster for E2E tests |
| 93 | + and remove Kind setup from CI workflows. |
| 94 | + kind: "addition" |
| 95 | + breaking: false |
| 96 | + migration: |
| 97 | + header: Add cluster setup for e2e tests in Makefile and update CI workflow |
| 98 | + body: | |
| 99 | + Remove direct Kind commands in GitHub workflows: |
| 100 | +
|
| 101 | + **Removed:** |
| 102 | + ```yaml |
| 103 | + - name: Create kind cluster |
| 104 | + run: kind create cluster |
| 105 | + ``` |
| 106 | +
|
| 107 | + **Added to Makefile:** |
| 108 | + ```makefile |
| 109 | + KIND_CLUSTER ?= <project-name>-test-e2e |
| 110 | +
|
| 111 | + .PHONY: setup-test-e2e |
| 112 | + setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist |
| 113 | + @command -v $(KIND) >/dev/null 2>&1 || { \ |
| 114 | + echo "Kind is not installed. Please install Kind manually."; \ |
| 115 | + exit 1; \ |
| 116 | + } |
| 117 | + @case "$$($(KIND) get clusters)" in \ |
| 118 | + *"$(KIND_CLUSTER)"*) \ |
| 119 | + echo "Kind cluster '$(KIND_CLUSTER)' already exists. Skipping creation." ;; \ |
| 120 | + *) \ |
| 121 | + echo "Creating Kind cluster '$(KIND_CLUSTER)'..."; \ |
| 122 | + $(KIND) create cluster --name $(KIND_CLUSTER) ;; \ |
| 123 | + esac |
| 124 | +
|
| 125 | + .PHONY: cleanup-test-e2e |
| 126 | + cleanup-test-e2e: |
| 127 | + $(KIND) delete cluster --name $(KIND_CLUSTER) |
| 128 | + ``` |
| 129 | +
|
| 130 | + Update `test-e2e` target to call these appropriately. |
0 commit comments