Skip to content

Commit c975e3a

Browse files
authored
Release v1.40.0 (#6956)
Signed-off-by: Adam D. Cornett <adc@redhat.com>
1 parent 2515eab commit c975e3a

File tree

19 files changed

+577
-683
lines changed

19 files changed

+577
-683
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SHELL = /bin/bash
44
# This value must be updated to the release tag of the most recent release, a change that must
55
# occur in the release commit. IMAGE_VERSION will be removed once each subproject that uses this
66
# version is moved to a separate repo and release process.
7-
export IMAGE_VERSION = v1.39.2
7+
export IMAGE_VERSION = v1.40.0
88
# Build-time variables to inject into binaries
99
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)
1010
export GIT_VERSION = $(shell git describe --dirty --tags --always)

changelog/fragments/generalize-container-tool.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

changelog/fragments/upgrade-opm.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

changelog/fragments/upgrade_kubebuilder_deps.yaml

Lines changed: 0 additions & 612 deletions
This file was deleted.

changelog/generated/v1.40.0.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## v1.40.0
2+
3+
### Additions
4+
5+
- (go/v4) For Go-based operators, a devcontainer is now available to allow users to develop and test the operator in a local environment and leverage on solutions such as VS Code Remote Containers and GitHub Codespaces to have a consistent development environment. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
6+
- (go/v4) For Go-based operators, new GitHub Actions are available to ensure better quality of their code. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
7+
- (go/v4) For Go-based operators, controllers now use `.Named("<Kind>")` in `SetupWithManager` to prevent naming conflicts in multi-group projects. ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/4162)). ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
8+
- (go/v4) For Go-based operators, a new Makefile target named `lint-config` has been added to verify that your `.golangci.yaml` configuration file is valid. This helps catch issues early when customizing lint rules.
9+
([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/4462)). ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
10+
- For ALL-based operators, scaffolded resources now include the `app.kubernetes.io/name` label to support Kubernetes best practices for app identification. ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/4437/files)). ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
11+
- For ALL-based operators, new role manifests are now scaffolded under the `config/rbac/` directory to assist cluster administrators. For each API defined in the project, three role files are generated: `<kind>_admin_role.yaml`, `<kind>_editor_role.yaml`, and `<kind>_viewer_role.yaml`.
12+
These roles are not applied by default. Instead, they are provided as helpers, allowing cluster administrators to customize and apply appropriate permissions as needed.
13+
The primary motivation for scaffolding these roles is to simplify integration with Kubernetes' aggregated roles mechanism. By including annotations such as `rbac.authorization.k8s.io/aggregate-to-admin: "true"`, `rbac.authorization.k8s.io/aggregate-to-edit: "true"`, and `rbac.authorization.k8s.io/aggregate-to-view: "true"`, these role definitions can automatically contribute permissions to the default admin, edit, and view roles in a cluster when applied.
14+
For more information on Kubernetes RBAC and aggregated roles, see: https://kubernetes.io/docs/reference/access-authn-authz/rbac/. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
15+
- For ALL-based operators, new role manifests are now scaffolded under the `config/rbac/` directory to assist cluster administrators. For each API defined in the project, three role files are generated: `<kind>_admin_role.yaml`, `<kind>_editor_role.yaml`, and `<kind>_viewer_role.yaml`.
16+
These roles are not applied by default. Instead, they are provided as helpers, allowing cluster administrators to customize and apply appropriate permissions as needed.
17+
The primary motivation for scaffolding these roles is to simplify integration with Kubernetes' aggregated roles mechanism. By including annotations such as `rbac.authorization.k8s.io/aggregate-to-admin: "true"`, `rbac.authorization.k8s.io/aggregate-to-edit: "true"`, and `rbac.authorization.k8s.io/aggregate-to-view: "true"`, these role definitions can automatically contribute permissions to the default admin, edit, and view roles in a cluster when applied.
18+
For more information on Kubernetes RBAC and aggregated roles, see: https://kubernetes.io/docs/reference/access-authn-authz/rbac/. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
19+
20+
### Changes
21+
22+
- The bundle build target now respects the CONTAINER_TOOL variable, allowing users to use alternative container tools like podman instead of docker. ([#6932](https://github.com/operator-framework/operator-sdk/pull/6932))
23+
- For All-based Operators, upgrade OPM to version from `v1.23.0` to `v1.55.0`, which includes several bug fixes and improvements. For further information, see: https://github.com/operator-framework/operator-registry/releases. ([#6953](https://github.com/operator-framework/operator-sdk/pull/6953))
24+
- (go/v4) For Go-based Operators, the `main.go` file has been enhanced to support real TLS certificates for both webhooks and the metrics server, with automated certificate rotation via cert-manager. This change improves security and aligns with production-grade best practices.
25+
Previously, setups relied on kube-rbac-proxy (deprecated in Operator SDK and Kubebuilder, see: [kubebuilder/discussions/3907](https://github.com/kubernetes-sigs/kubebuilder/discussions/3907)), which generated TLS certificates dynamically — a method no longer recommended for secure environments. The updated approach adopts static certificates managed by cert-manager.
26+
Additionally, integrations with Prometheus now support scraping metrics using the cert-manager generated certificates. A related fix was introduced to ensure that CA injection patches are only applied to CRDs with a conversion webhook, avoiding unnecessary annotations.
27+
To support these improvements, changes to `config/default/kustomization.yaml` are required. These include: configuring webhook and metrics server certificates, enabling Prometheus scraping with TLS, and correcting CA injection behavior.
28+
These updates also introduce flexible opt-in mechanisms, allowing users to selectively enable or disable: - TLS for the metrics server via cert-manager - TLS for webhooks via cert-manager - TLS configuration for Prometheus scraping
29+
Together, these changes are part of a broader effort to elevate the default security posture and configurability of Go-based operators. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
30+
- (go/v4) For Go-based operators, a fix has been implemented to ensure that the Prometheus configuration can properly scrape metrics from the operator's metrics server when TLS is enabled. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
31+
- (go/v4) For Go-based operators, a fix has been implemented to ensure that CA injection patches are applied only to CRDs that define a conversion webhook.
32+
Previously, the CA injection patch logic was overly broad — applying injection annotations to all CRDs whenever a webhook was scaffolded with the `--conversion` flag. This behavior was introduced in Kubebuilder release `v3.5.0` when replacements were introduced in place of legacy vars and the `kustomize/v2-alpha` plugin was adopted.
33+
The incorrect behavior likely went unnoticed due to incomplete support for conversion webhooks in earlier versions. This release addresses that gap, enabling proper scaffolding and CA injection behavior specifically for CRDs with conversion webhooks.
34+
To support this improvement, a new marker has been introduced: `+kubebuilder:scaffold:crdkustomizecainjectionns`. This marker ensures that the correct replacements are generated in `config/default/kustomization.yaml` for CA injection. Additionally, the `kubebuilder:scaffold:crdkustomizewebhookpatch` marker was created to ensure that the webhook patch is only applied to CRDs that have a conversion webhook in the `config/crd/kustomization.yaml` file.
35+
For more information on this and other scaffolding markers, refer to the official Kubebuilder documentation: https://book.kubebuilder.io/reference/markers/scaffold. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
36+
- (go/v4) For Go-based operators, ENVTEST version management is now automated by deriving values from `go.mod`, and controller tests now locate binaries dynamically. ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/4401))
37+
These updates improve the developer experience by: - Reducing manual configuration for ENVTEST. - Ensuring IDEs or test runners can locate the binaries reliably. - Making controller test scaffolding more robust and portable. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
38+
- (go/v4) For Go-based operators, updated GolangCI-Lint configuration to replace the deprecated `exportloopref` linter with the `copyloopvar` linter. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
39+
- (go/v4) For Go-based operators, upgraded project scaffolding to Go 1.23, Kubernetes v0.32.1, and controller-runtime v0.20.4.
40+
The default project scaffolding for Go-based operators has been updated to use:
41+
- **Go 1.23**
42+
- **Kubernetes modules v0.32.1**
43+
- **controller-runtime v0.20.4**
44+
- **Ginkgo v2.22.0** and **Gomega v1.36.1**. ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))
45+
- **Breaking change**: (go/v4) For Go-based operators, upgraded controller-runtime from `v0.19.4` to `v0.20.0` and added support for Kubernetes 1.32. Removed deprecated `webhook.Validator` and `webhook.Defaulter` interfaces from the runtime. Webhooks should no longer reside under the `api/` directory—this has been the default behavior since Kubebuilder rlease [v4.3.0)(https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v4.3.0).
46+
A `--legacy=true` flag was added to support scaffolding webhooks in the old layout when needed. ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/4492) · [Migration guide](https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v4.3.0)). ([#6928](https://github.com/operator-framework/operator-sdk/pull/6928))

testdata/go/v4/memcached-operator/bundle/tests/scorecard/config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ stages:
88
- entrypoint:
99
- scorecard-test
1010
- basic-check-spec
11-
image: quay.io/operator-framework/scorecard-test:v1.39.2
11+
image: quay.io/operator-framework/scorecard-test:v1.40.0
1212
labels:
1313
suite: basic
1414
test: basic-check-spec-test
@@ -18,7 +18,7 @@ stages:
1818
- entrypoint:
1919
- scorecard-test
2020
- olm-bundle-validation
21-
image: quay.io/operator-framework/scorecard-test:v1.39.2
21+
image: quay.io/operator-framework/scorecard-test:v1.40.0
2222
labels:
2323
suite: olm
2424
test: olm-bundle-validation-test
@@ -28,7 +28,7 @@ stages:
2828
- entrypoint:
2929
- scorecard-test
3030
- olm-crds-have-validation
31-
image: quay.io/operator-framework/scorecard-test:v1.39.2
31+
image: quay.io/operator-framework/scorecard-test:v1.40.0
3232
labels:
3333
suite: olm
3434
test: olm-crds-have-validation-test
@@ -38,7 +38,7 @@ stages:
3838
- entrypoint:
3939
- scorecard-test
4040
- olm-crds-have-resources
41-
image: quay.io/operator-framework/scorecard-test:v1.39.2
41+
image: quay.io/operator-framework/scorecard-test:v1.40.0
4242
labels:
4343
suite: olm
4444
test: olm-crds-have-resources-test
@@ -48,7 +48,7 @@ stages:
4848
- entrypoint:
4949
- scorecard-test
5050
- olm-spec-descriptors
51-
image: quay.io/operator-framework/scorecard-test:v1.39.2
51+
image: quay.io/operator-framework/scorecard-test:v1.40.0
5252
labels:
5353
suite: olm
5454
test: olm-spec-descriptors-test
@@ -58,7 +58,7 @@ stages:
5858
- entrypoint:
5959
- scorecard-test
6060
- olm-status-descriptors
61-
image: quay.io/operator-framework/scorecard-test:v1.39.2
61+
image: quay.io/operator-framework/scorecard-test:v1.40.0
6262
labels:
6363
suite: olm
6464
test: olm-status-descriptors-test

testdata/go/v4/memcached-operator/config/scorecard/patches/basic.config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
entrypoint:
55
- scorecard-test
66
- basic-check-spec
7-
image: quay.io/operator-framework/scorecard-test:v1.39.2
7+
image: quay.io/operator-framework/scorecard-test:v1.40.0
88
labels:
99
suite: basic
1010
test: basic-check-spec-test

testdata/go/v4/memcached-operator/config/scorecard/patches/olm.config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
entrypoint:
55
- scorecard-test
66
- olm-bundle-validation
7-
image: quay.io/operator-framework/scorecard-test:v1.39.2
7+
image: quay.io/operator-framework/scorecard-test:v1.40.0
88
labels:
99
suite: olm
1010
test: olm-bundle-validation-test
@@ -14,7 +14,7 @@
1414
entrypoint:
1515
- scorecard-test
1616
- olm-crds-have-validation
17-
image: quay.io/operator-framework/scorecard-test:v1.39.2
17+
image: quay.io/operator-framework/scorecard-test:v1.40.0
1818
labels:
1919
suite: olm
2020
test: olm-crds-have-validation-test
@@ -24,7 +24,7 @@
2424
entrypoint:
2525
- scorecard-test
2626
- olm-crds-have-resources
27-
image: quay.io/operator-framework/scorecard-test:v1.39.2
27+
image: quay.io/operator-framework/scorecard-test:v1.40.0
2828
labels:
2929
suite: olm
3030
test: olm-crds-have-resources-test
@@ -34,7 +34,7 @@
3434
entrypoint:
3535
- scorecard-test
3636
- olm-spec-descriptors
37-
image: quay.io/operator-framework/scorecard-test:v1.39.2
37+
image: quay.io/operator-framework/scorecard-test:v1.40.0
3838
labels:
3939
suite: olm
4040
test: olm-spec-descriptors-test
@@ -44,7 +44,7 @@
4444
entrypoint:
4545
- scorecard-test
4646
- olm-status-descriptors
47-
image: quay.io/operator-framework/scorecard-test:v1.39.2
47+
image: quay.io/operator-framework/scorecard-test:v1.40.0
4848
labels:
4949
suite: olm
5050
test: olm-status-descriptors-test

testdata/go/v4/monitoring/memcached-operator/bundle/tests/scorecard/config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ stages:
88
- entrypoint:
99
- scorecard-test
1010
- basic-check-spec
11-
image: quay.io/operator-framework/scorecard-test:v1.39.2
11+
image: quay.io/operator-framework/scorecard-test:v1.40.0
1212
labels:
1313
suite: basic
1414
test: basic-check-spec-test
@@ -18,7 +18,7 @@ stages:
1818
- entrypoint:
1919
- scorecard-test
2020
- olm-bundle-validation
21-
image: quay.io/operator-framework/scorecard-test:v1.39.2
21+
image: quay.io/operator-framework/scorecard-test:v1.40.0
2222
labels:
2323
suite: olm
2424
test: olm-bundle-validation-test
@@ -28,7 +28,7 @@ stages:
2828
- entrypoint:
2929
- scorecard-test
3030
- olm-crds-have-validation
31-
image: quay.io/operator-framework/scorecard-test:v1.39.2
31+
image: quay.io/operator-framework/scorecard-test:v1.40.0
3232
labels:
3333
suite: olm
3434
test: olm-crds-have-validation-test
@@ -38,7 +38,7 @@ stages:
3838
- entrypoint:
3939
- scorecard-test
4040
- olm-crds-have-resources
41-
image: quay.io/operator-framework/scorecard-test:v1.39.2
41+
image: quay.io/operator-framework/scorecard-test:v1.40.0
4242
labels:
4343
suite: olm
4444
test: olm-crds-have-resources-test
@@ -48,7 +48,7 @@ stages:
4848
- entrypoint:
4949
- scorecard-test
5050
- olm-spec-descriptors
51-
image: quay.io/operator-framework/scorecard-test:v1.39.2
51+
image: quay.io/operator-framework/scorecard-test:v1.40.0
5252
labels:
5353
suite: olm
5454
test: olm-spec-descriptors-test
@@ -58,7 +58,7 @@ stages:
5858
- entrypoint:
5959
- scorecard-test
6060
- olm-status-descriptors
61-
image: quay.io/operator-framework/scorecard-test:v1.39.2
61+
image: quay.io/operator-framework/scorecard-test:v1.40.0
6262
labels:
6363
suite: olm
6464
test: olm-status-descriptors-test

testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/basic.config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
entrypoint:
55
- scorecard-test
66
- basic-check-spec
7-
image: quay.io/operator-framework/scorecard-test:v1.39.2
7+
image: quay.io/operator-framework/scorecard-test:v1.40.0
88
labels:
99
suite: basic
1010
test: basic-check-spec-test

testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/olm.config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
entrypoint:
55
- scorecard-test
66
- olm-bundle-validation
7-
image: quay.io/operator-framework/scorecard-test:v1.39.2
7+
image: quay.io/operator-framework/scorecard-test:v1.40.0
88
labels:
99
suite: olm
1010
test: olm-bundle-validation-test
@@ -14,7 +14,7 @@
1414
entrypoint:
1515
- scorecard-test
1616
- olm-crds-have-validation
17-
image: quay.io/operator-framework/scorecard-test:v1.39.2
17+
image: quay.io/operator-framework/scorecard-test:v1.40.0
1818
labels:
1919
suite: olm
2020
test: olm-crds-have-validation-test
@@ -24,7 +24,7 @@
2424
entrypoint:
2525
- scorecard-test
2626
- olm-crds-have-resources
27-
image: quay.io/operator-framework/scorecard-test:v1.39.2
27+
image: quay.io/operator-framework/scorecard-test:v1.40.0
2828
labels:
2929
suite: olm
3030
test: olm-crds-have-resources-test
@@ -34,7 +34,7 @@
3434
entrypoint:
3535
- scorecard-test
3636
- olm-spec-descriptors
37-
image: quay.io/operator-framework/scorecard-test:v1.39.2
37+
image: quay.io/operator-framework/scorecard-test:v1.40.0
3838
labels:
3939
suite: olm
4040
test: olm-spec-descriptors-test
@@ -44,7 +44,7 @@
4444
entrypoint:
4545
- scorecard-test
4646
- olm-status-descriptors
47-
image: quay.io/operator-framework/scorecard-test:v1.39.2
47+
image: quay.io/operator-framework/scorecard-test:v1.40.0
4848
labels:
4949
suite: olm
5050
test: olm-status-descriptors-test

testdata/helm/memcached-operator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM quay.io/operator-framework/helm-operator:v1.39.2
2+
FROM quay.io/operator-framework/helm-operator:v1.40.0
33

44
ENV HOME=/opt/helm
55
COPY watches.yaml ${HOME}/watches.yaml

testdata/helm/memcached-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null))
150150
@{ \
151151
set -e ;\
152152
mkdir -p $(dir $(HELM_OPERATOR)) ;\
153-
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.39.2/helm-operator_$(OS)_$(ARCH) ;\
153+
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.40.0/helm-operator_$(OS)_$(ARCH) ;\
154154
chmod +x $(HELM_OPERATOR) ;\
155155
}
156156
else

0 commit comments

Comments
 (0)