diff --git a/Makefile b/Makefile index 0f345b1739a..71846ebc415 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SHELL = /bin/bash # This value must be updated to the release tag of the most recent release, a change that must # occur in the release commit. IMAGE_VERSION will be removed once each subproject that uses this # version is moved to a separate repo and release process. -export IMAGE_VERSION = v1.40.0 +export IMAGE_VERSION = v1.41.0 # Build-time variables to inject into binaries export SIMPLE_VERSION = $(shell (test "$(shell git describe --tags)" = "$(shell git describe --tags --abbrev=0)" && echo $(shell git describe --tags)) || echo $(shell git describe --tags --abbrev=0)+git) export GIT_VERSION = $(shell git describe --dirty --tags --always) diff --git a/changelog/fragments/upgrade_kb_latest.yaml b/changelog/fragments/upgrade_kb_latest.yaml deleted file mode 100644 index 1a86e8eb95b..00000000000 --- a/changelog/fragments/upgrade_kb_latest.yaml +++ /dev/null @@ -1,130 +0,0 @@ -entries: - - description: > - For Go-based operators, upgrade the Go version from `1.23` to `1.24` - kind: "change" - breaking: true - migration: - header: Upgrade Go version to 1.24 - body: | - Update the Go version used to `1.24`. This affects: - - **Dockerfile:** - ```dockerfile - -FROM golang:1.23 AS builder - +FROM golang:1.24 AS builder - ``` - - **.devcontainer/devcontainer.json:** - ```json - - "image": "golang:1.23", - + "image": "golang:1.24", - ``` - - **go.mod:** - ```go - -go 1.23.0 - +go 1.24.0 - ``` - - - description: > - For Go-based operators, upgrade golangci-lint to `v2.1.0` and update `.golangci.yml` - to the v2 config format with enhanced structure and controls. - kind: "change" - breaking: false - migration: - header: Upgrade golangci-lint and use v2 config - body: | - Update golangci-lint usage across the project: - - **Makefile:** - ```makefile - -GOLANGCI_LINT_VERSION ?= v1.63.4 - +GOLANGCI_LINT_VERSION ?= v2.1.0 - - -$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) - +$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) - ``` - - **GitHub Actions Workflow:** - ```yaml - - uses: golangci/golangci-lint-action@v6 - + uses: golangci/golangci-lint-action@v8 - ``` - - **.golangci.yml:** - Convert to v2 layout with keys like `version`, `linters`, `settings`, `formatters`, `exclusions`. - 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) - - - description: > - For Go-based operators, upgrade controller-gen from `v0.17.2` to `v0.18.0`. - kind: "change" - breaking: false - migration: - header: Upgrade controller-gen to `v0.18.0` - body: | - Update controller-gen tooling and annotations: - - **Makefile:** - ```makefile - -CONTROLLER_TOOLS_VERSION ?= v0.17.2 - +CONTROLLER_TOOLS_VERSION ?= v0.18.0 - ``` - - Run `make generate` to regenerate code and manifests with the new version. - - - description: > - For Go-based operators, upgrade controller-runtime from `v0.20.4` to `v0.21.0` - and kubernetes dependencies to `v0.33`. - kind: "change" - breaking: false - migration: - header: Upgrade controller-runtime to `v0.21.0` - body: | - Update the `go.mod` import: - ```go - -sigs.k8s.io/controller-runtime v0.20.4 - +sigs.k8s.io/controller-runtime v0.21.0 - ``` - - Run `go mod tidy` to upgrade the k8s dependencies. - - - description: > - For Go-based operators, add new target to setup/teardown Kind cluster for E2E tests - and remove Kind setup from CI workflows. - kind: "addition" - breaking: false - migration: - header: Add cluster setup for e2e tests in Makefile and update CI workflow - body: | - Remove direct Kind commands in GitHub workflows: - - **Removed:** - ```yaml - - name: Create kind cluster - run: kind create cluster - ``` - - **Added to Makefile:** - ```makefile - KIND_CLUSTER ?= -test-e2e - - .PHONY: setup-test-e2e - setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist - @command -v $(KIND) >/dev/null 2>&1 || { \ - echo "Kind is not installed. Please install Kind manually."; \ - exit 1; \ - } - @case "$$($(KIND) get clusters)" in \ - *"$(KIND_CLUSTER)"*) \ - echo "Kind cluster '$(KIND_CLUSTER)' already exists. Skipping creation." ;; \ - *) \ - echo "Creating Kind cluster '$(KIND_CLUSTER)'..."; \ - $(KIND) create cluster --name $(KIND_CLUSTER) ;; \ - esac - - .PHONY: cleanup-test-e2e - cleanup-test-e2e: - $(KIND) delete cluster --name $(KIND_CLUSTER) - ``` - - Update `test-e2e` target to call these appropriately. diff --git a/changelog/generated/v1.41.0.md b/changelog/generated/v1.41.0.md new file mode 100644 index 00000000000..947af9b5724 --- /dev/null +++ b/changelog/generated/v1.41.0.md @@ -0,0 +1,12 @@ +## v1.41.0 + +### Additions + +- For Go-based operators, add new target to setup/teardown Kind cluster for E2E tests and remove Kind setup from CI workflows. ([#6954](https://github.com/operator-framework/operator-sdk/pull/6954)) + +### Changes + +- **Breaking change**: For Go-based operators, upgrade the Go version from `1.23` to `1.24`. ([#6954](https://github.com/operator-framework/operator-sdk/pull/6954)) +- For Go-based operators, upgrade golangci-lint to `v2.1.0` and update `.golangci.yml` to the v2 config format with enhanced structure and controls. ([#6954](https://github.com/operator-framework/operator-sdk/pull/6954)) +- For Go-based operators, upgrade controller-gen from `v0.17.2` to `v0.18.0`. ([#6954](https://github.com/operator-framework/operator-sdk/pull/6954)) +- For Go-based operators, upgrade controller-runtime from `v0.20.4` to `v0.21.0` and kubernetes dependencies to `v0.33`. ([#6954](https://github.com/operator-framework/operator-sdk/pull/6954)) diff --git a/testdata/go/v4/memcached-operator/Makefile b/testdata/go/v4/memcached-operator/Makefile index b43a379ad86..191fa26f3c8 100644 --- a/testdata/go/v4/memcached-operator/Makefile +++ b/testdata/go/v4/memcached-operator/Makefile @@ -48,7 +48,7 @@ endif # Set the Operator SDK version to use. By default, what is installed on the system is used. # This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. -OPERATOR_SDK_VERSION ?= v1.40.0 +OPERATOR_SDK_VERSION ?= v1.41.0 # Image URL to use all building/pushing image targets IMG ?= controller:latest diff --git a/testdata/go/v4/memcached-operator/bundle/tests/scorecard/config.yaml b/testdata/go/v4/memcached-operator/bundle/tests/scorecard/config.yaml index f7368a430eb..946cf910e20 100644 --- a/testdata/go/v4/memcached-operator/bundle/tests/scorecard/config.yaml +++ b/testdata/go/v4/memcached-operator/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-resources-test @@ -48,7 +48,7 @@ stages: - entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-spec-descriptors-test @@ -58,7 +58,7 @@ stages: - entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/testdata/go/v4/memcached-operator/config/scorecard/patches/basic.config.yaml b/testdata/go/v4/memcached-operator/config/scorecard/patches/basic.config.yaml index f7e0ed492be..22884c5382f 100644 --- a/testdata/go/v4/memcached-operator/config/scorecard/patches/basic.config.yaml +++ b/testdata/go/v4/memcached-operator/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: basic test: basic-check-spec-test diff --git a/testdata/go/v4/memcached-operator/config/scorecard/patches/olm.config.yaml b/testdata/go/v4/memcached-operator/config/scorecard/patches/olm.config.yaml index 85895c9e93d..d2f829662ce 100644 --- a/testdata/go/v4/memcached-operator/config/scorecard/patches/olm.config.yaml +++ b/testdata/go/v4/memcached-operator/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-resources-test @@ -34,7 +34,7 @@ entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-spec-descriptors-test @@ -44,7 +44,7 @@ entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/testdata/go/v4/monitoring/memcached-operator/Makefile b/testdata/go/v4/monitoring/memcached-operator/Makefile index 346da1ce6b9..0a1d03b39f7 100644 --- a/testdata/go/v4/monitoring/memcached-operator/Makefile +++ b/testdata/go/v4/monitoring/memcached-operator/Makefile @@ -48,7 +48,7 @@ endif # Set the Operator SDK version to use. By default, what is installed on the system is used. # This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. -OPERATOR_SDK_VERSION ?= v1.40.0 +OPERATOR_SDK_VERSION ?= v1.41.0 # Image URL to use all building/pushing image targets IMG ?= controller:latest diff --git a/testdata/go/v4/monitoring/memcached-operator/bundle/tests/scorecard/config.yaml b/testdata/go/v4/monitoring/memcached-operator/bundle/tests/scorecard/config.yaml index f7368a430eb..946cf910e20 100644 --- a/testdata/go/v4/monitoring/memcached-operator/bundle/tests/scorecard/config.yaml +++ b/testdata/go/v4/monitoring/memcached-operator/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-resources-test @@ -48,7 +48,7 @@ stages: - entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-spec-descriptors-test @@ -58,7 +58,7 @@ stages: - entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/basic.config.yaml b/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/basic.config.yaml index f7e0ed492be..22884c5382f 100644 --- a/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/basic.config.yaml +++ b/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: basic test: basic-check-spec-test diff --git a/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/olm.config.yaml b/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/olm.config.yaml index 85895c9e93d..d2f829662ce 100644 --- a/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/olm.config.yaml +++ b/testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-resources-test @@ -34,7 +34,7 @@ entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-spec-descriptors-test @@ -44,7 +44,7 @@ entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/testdata/helm/memcached-operator/Dockerfile b/testdata/helm/memcached-operator/Dockerfile index 1a8f8ca280c..dc997558afa 100644 --- a/testdata/helm/memcached-operator/Dockerfile +++ b/testdata/helm/memcached-operator/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM quay.io/operator-framework/helm-operator:v1.40.0 +FROM quay.io/operator-framework/helm-operator:v1.41.0 ENV HOME=/opt/helm COPY watches.yaml ${HOME}/watches.yaml diff --git a/testdata/helm/memcached-operator/Makefile b/testdata/helm/memcached-operator/Makefile index 845dda7715e..c644e15e682 100644 --- a/testdata/helm/memcached-operator/Makefile +++ b/testdata/helm/memcached-operator/Makefile @@ -150,7 +150,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null)) @{ \ set -e ;\ mkdir -p $(dir $(HELM_OPERATOR)) ;\ - curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.40.0/helm-operator_$(OS)_$(ARCH) ;\ + curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.41.0/helm-operator_$(OS)_$(ARCH) ;\ chmod +x $(HELM_OPERATOR) ;\ } else diff --git a/testdata/helm/memcached-operator/bundle/tests/scorecard/config.yaml b/testdata/helm/memcached-operator/bundle/tests/scorecard/config.yaml index f7368a430eb..946cf910e20 100644 --- a/testdata/helm/memcached-operator/bundle/tests/scorecard/config.yaml +++ b/testdata/helm/memcached-operator/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-resources-test @@ -48,7 +48,7 @@ stages: - entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-spec-descriptors-test @@ -58,7 +58,7 @@ stages: - entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/testdata/helm/memcached-operator/config/scorecard/patches/basic.config.yaml b/testdata/helm/memcached-operator/config/scorecard/patches/basic.config.yaml index f7e0ed492be..22884c5382f 100644 --- a/testdata/helm/memcached-operator/config/scorecard/patches/basic.config.yaml +++ b/testdata/helm/memcached-operator/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: basic test: basic-check-spec-test diff --git a/testdata/helm/memcached-operator/config/scorecard/patches/olm.config.yaml b/testdata/helm/memcached-operator/config/scorecard/patches/olm.config.yaml index 85895c9e93d..d2f829662ce 100644 --- a/testdata/helm/memcached-operator/config/scorecard/patches/olm.config.yaml +++ b/testdata/helm/memcached-operator/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-crds-have-resources-test @@ -34,7 +34,7 @@ entrypoint: - scorecard-test - olm-spec-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-spec-descriptors-test @@ -44,7 +44,7 @@ entrypoint: - scorecard-test - olm-status-descriptors - image: quay.io/operator-framework/scorecard-test:v1.40.0 + image: quay.io/operator-framework/scorecard-test:v1.41.0 labels: suite: olm test: olm-status-descriptors-test diff --git a/website/config.toml b/website/config.toml index 4834f7987c2..e6b2454ef31 100644 --- a/website/config.toml +++ b/website/config.toml @@ -93,20 +93,26 @@ url_latest_version = "https://sdk.operatorframework.io" version = "master" url = "https://master.sdk.operatorframework.io" ##LATEST_RELEASE_KUBE_VERSION## - kube_version = "1.32.0" + kube_version = "1.33.1" ##LATEST_RELEASE_CLIENT_GO_VERSION## - client_go_version = "v0.32.4" + client_go_version = "v0.33.2" [[params.versions]] version = "Latest Release" url = "https://sdk.operatorframework.io" ##LATEST_RELEASE_KUBE_VERSION## - kube_version = "1.32.0" + kube_version = "1.33.1" ##LATEST_RELEASE_CLIENT_GO_VERSION## - client_go_version = "v0.32.4" + client_go_version = "v0.33.2" ##RELEASE_ADDME## +[[params.versions]] + version = "v1.41" + url = "https://v1-41-x.sdk.operatorframework.io" + kube_version = "1.33.1" + client_go_version = "v0.33.2" + [[params.versions]] version = "v1.40" url = "https://v1-40-x.sdk.operatorframework.io" diff --git a/website/content/en/docs/installation/_index.md b/website/content/en/docs/installation/_index.md index d2b30a0d7ce..bc513dc99ad 100644 --- a/website/content/en/docs/installation/_index.md +++ b/website/content/en/docs/installation/_index.md @@ -36,7 +36,7 @@ export OS=$(uname | awk '{print tolower($0)}') Download the binary for your platform: ```sh -export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.40.0 +export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.41.0 curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH} ``` diff --git a/website/content/en/docs/upgrading-sdk-version/v1.41.0.md b/website/content/en/docs/upgrading-sdk-version/v1.41.0.md new file mode 100644 index 00000000000..8a3b54fc819 --- /dev/null +++ b/website/content/en/docs/upgrading-sdk-version/v1.41.0.md @@ -0,0 +1,116 @@ +--- +title: v1.41.0 +weight: 998959000 +--- + +## Upgrade Go version to 1.24 + +Update the Go version used to `1.24`. This affects: + +**Dockerfile:** +```diff +- FROM golang:1.23 AS builder ++ FROM golang:1.24 AS builder +``` + +**.devcontainer/devcontainer.json:** +```diff +- "image": "golang:1.23", ++ "image": "golang:1.24", +``` + +**go.mod:** +```diff +- go 1.23.0 ++ go 1.24.0 +``` + +_See [#6954](https://github.com/operator-framework/operator-sdk/pull/6954) for more details._ + +## Upgrade golangci-lint and use v2 config + +Update golangci-lint usage across the project: + +**Makefile:** +```diff +- GOLANGCI_LINT_VERSION ?= v1.63.4 ++ GOLANGCI_LINT_VERSION ?= v2.1.0 + +- $(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) ++ $(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) +``` + +**GitHub Actions Workflow:** +```diff +- uses: golangci/golangci-lint-action@v6 ++ uses: golangci/golangci-lint-action@v8 +``` + +**.golangci.yml:** +Convert to v2 layout with keys like `version`, `linters`, `settings`, `formatters`, `exclusions`. +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) + +_See [#6954](https://github.com/operator-framework/operator-sdk/pull/6954) for more details._ + +## Upgrade controller-gen to `v0.18.0` + +Update controller-gen tooling and annotations: + +**Makefile:** +```diff +- CONTROLLER_TOOLS_VERSION ?= v0.17.2 ++ CONTROLLER_TOOLS_VERSION ?= v0.18.0 +``` + +Run `make generate` to regenerate code and manifests with the new version. + +_See [#6954](https://github.com/operator-framework/operator-sdk/pull/6954) for more details._ + +## Upgrade controller-runtime to `v0.21.0` + +Update the `go.mod` import: +```diff +- sigs.k8s.io/controller-runtime v0.20.4 ++ sigs.k8s.io/controller-runtime v0.21.0 +``` + +Run `go mod tidy` to upgrade the k8s dependencies. + +_See [#6954](https://github.com/operator-framework/operator-sdk/pull/6954) for more details._ + +## Add cluster setup for e2e tests in Makefile and update CI workflow + +Remove direct Kind commands in GitHub workflows: + +**Removed:** +```yaml +- name: Create kind cluster + run: kind create cluster +``` + +**Added to Makefile:** +```makefile +KIND_CLUSTER ?= -test-e2e + +.PHONY: setup-test-e2e +setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist + @command -v $(KIND) >/dev/null 2>&1 || { \ + echo "Kind is not installed. Please install Kind manually."; \ + exit 1; \ + } + @case "$$($(KIND) get clusters)" in \ + *"$(KIND_CLUSTER)"*) \ + echo "Kind cluster '$(KIND_CLUSTER)' already exists. Skipping creation." ;; \ + *) \ + echo "Creating Kind cluster '$(KIND_CLUSTER)'..."; \ + $(KIND) create cluster --name $(KIND_CLUSTER) ;; \ + esac + +.PHONY: cleanup-test-e2e +cleanup-test-e2e: + $(KIND) delete cluster --name $(KIND_CLUSTER) +``` + +Update `test-e2e` target to call these appropriately. + +_See [#6954](https://github.com/operator-framework/operator-sdk/pull/6954) for more details._