Skip to content

Commit 04f3392

Browse files
authored
Release 2.8.1: ship CRDs as an optional native-crds/ subchart (installCrds) (#164)
* Release 2.8.1: fix release build with dev-tools 1.17.0 for Rust 1.95.0 * Update v2.8.1.md * fix CRD lifecycle: retain on uninstall (resource-policy keep) + document upgrade adoption Inject helm.sh/resource-policy: keep into each templated CRD via a fromYaml/toYaml round-trip so the CRDs (and their custom resources) survive helm uninstall and installCrds true->false, without touching the canonical crd/ files. Document the pre-2.8 -> 2.8 adoption path (--take-ownership or label/annotate) and the installCrds:false out-of-band option in the v2.8.1 release notes, and correct the v2.8.0 uninstall caveat. * Drop dev-tools base bump from 2.8.1 release The dev-tools 1.16.1->1.17.0 base-image fix (for the Rust 1.95.0 musl cross-compile) moves to the CI PR #165, which also adds a build-on-PR check. 2.8.1 is now purely the version bump + CRD lifecycle fix. * Correct installCrds comment: CRDs are retained on uninstall The prior note said templated CRDs are removed on uninstall; #164 added the helm.sh/resource-policy: keep annotation, so they now survive uninstall and installCrds=true->false. * Ship CRDs as an optional native-crds/ subchart (installCrds) Replace the templated-CRD approach (from #161/#164) with an optional restate-operator-crds subchart that places the CRDs in Helm's native crds/ directory, gated by the installCrds value (default true). Native crds/ are install-only and are never upgraded or deleted by Helm, which eliminates the upgrade ownership-adoption error and the uninstall cascade-delete problem the templated approach introduced. installCrds=false still disables the CRDs entirely (for BYOC/GitOps) by disabling the subchart dependency condition. The subchart symlinks the canonical crd/*.yaml (single source of truth); symlinks are resolved to real bytes at vendor time. The vendored subchart tgz + Chart.lock are committed so the published OCI chart is self-contained (the release pipeline does not run helm dependency build). * Update release notes for v2.8.0 Clarified that v2.8.0 was never published and is superseded by v2.8.1. Updated details about CRD installation approach.
1 parent 6f3b7a5 commit 04f3392

14 files changed

Lines changed: 75 additions & 69 deletions

File tree

AGENTS.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ Never hand-edit files in `crd/` -- always regenerate.
1010
After changing a CRD struct, regenerate in this order (or run `just generate-all`):
1111

1212
1. `just generate` -- regenerates the CRD YAML (`crd/*.yaml`). This is the authoritative schema and the
13-
only artifact shipped to users (the Helm chart symlinks it). Pure Rust; no external tools. Always
14-
run and commit it.
13+
only artifact shipped to users. The `restate-operator-crds` subchart
14+
(`charts/restate-operator-crds/crds/`) symlinks these files into Helm's native `crds/` directory,
15+
and the operator Helm chart pulls that subchart in as an optional dependency (gated by
16+
`installCrds`). Pure Rust; no external tools. Always run and commit it.
1517
2. `just generate-pkl` -- regenerates the Pkl bindings (`crd/*.pkl`), a convenience for Pkl users.
1618
Requires the `pkl` CLI on PATH; reads the CRD YAML, so run step 1 first.
1719
3. `just generate-examples` -- regenerates `crd/examples/*.yaml` from the Pkl examples. Requires `pkl`.
@@ -44,7 +46,22 @@ version files together to the new version:
4446

4547
- `Cargo.toml`
4648
- `Cargo.lock` (the `restate-operator` package entry — via `cargo check`, not by hand)
47-
- `charts/restate-operator-helm/Chart.yaml`
49+
- `charts/restate-operator-helm/Chart.yaml` (the chart version *and* the `restate-operator-crds`
50+
dependency version)
51+
- `charts/restate-operator-crds/Chart.yaml`
52+
53+
The CRDs ship as the optional `restate-operator-crds` subchart, vendored into the operator chart as a
54+
committed `charts/restate-operator-helm/charts/restate-operator-crds-<version>.tgz` (the release pipeline
55+
does not run `helm dependency build`, so the vendored tgz + `Chart.lock` are what make the published OCI
56+
chart self-contained). After bumping the versions above — or any time `crd/*.yaml` changes the CRD schema —
57+
re-vendor so the published chart carries the current CRDs:
58+
59+
```bash
60+
helm dependency update charts/restate-operator-helm
61+
```
62+
63+
and commit the updated `charts/restate-operator-helm/charts/restate-operator-crds-<version>.tgz` and
64+
`charts/restate-operator-helm/Chart.lock`.
4865

4966
Then consolidate the `release-notes/unreleased/` files into `v<version>.md`. See
5067
`release-notes/README.md` for the full, authoritative release process (bump → consolidate → delete → merge → tag).

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "restate-operator"
3-
version = "2.8.0"
3+
version = "2.8.1"
44
authors = ["restate.dev"]
55
edition = "2024"
66
rust-version = "1.92"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: restate-operator-crds
3+
description: Restate operator CustomResourceDefinitions (RestateCluster, RestateDeployment, RestateCloudEnvironment)
4+
type: application
5+
version: "2.8.1"

charts/restate-operator-helm/crd-manifests/restatecloudenvironments.yaml renamed to charts/restate-operator-crds/crds/restatecloudenvironments.yaml

File renamed without changes.

charts/restate-operator-helm/crd-manifests/restateclusters.yaml renamed to charts/restate-operator-crds/crds/restateclusters.yaml

File renamed without changes.

charts/restate-operator-helm/crd-manifests/restatedeployments.yaml renamed to charts/restate-operator-crds/crds/restatedeployments.yaml

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: restate-operator-crds
3+
repository: file://../restate-operator-crds
4+
version: 2.8.1
5+
digest: sha256:2c8960ffeb831c853f0bdca1265b1f8c56898c210575b133681c098fb5a8c4c9
6+
generated: "2026-07-14T16:40:45.737059+02:00"

charts/restate-operator-helm/Chart.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@ apiVersion: v2
22
name: restate-operator-helm
33
description: An operator for Restate clusters
44
type: application
5-
version: "2.8.0"
5+
version: "2.8.1"
6+
7+
dependencies:
8+
- name: restate-operator-crds
9+
version: "2.8.1"
10+
repository: "file://../restate-operator-crds"
11+
condition: installCrds
Binary file not shown.

0 commit comments

Comments
 (0)