You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**CRDs now ship as a Helm subchart** — the chart's CRDs (`RestateCluster`, `RestateDeployment`, `RestateCloudEnvironment`) ship via an optional `restate-operator-crds` subchart placed in Helm's native `crds/` directory. Installation is gated by the `installCrds` value (default `true`). Fresh installs get all three CRDs automatically. Set `installCrds: false` to manage CRDs out-of-band (GitOps, ArgoCD).
14
+
15
+
### CRD installation via Helm subchart
16
+
17
+
The chart now ships CRDs via a dedicated `restate-operator-crds` subchart. This resolves the longstanding issue of CRD ownership conflicts and simplifies upgrades.
18
+
19
+
-**Fresh installs**: CRDs are installed automatically by default.
20
+
-**GitOps / out-of-band management**: Set `installCrds: false` to skip CRD installation.
21
+
22
+
```yaml
23
+
# values.yaml
24
+
installCrds: false # manage CRDs externally
25
+
```
26
+
27
+
Upgrading from v2.7 and earlier is straightforward — existing CRDs are left untouched, no ownership adoption or `--take-ownership` step is needed:
**Note on CRD schema updates**: Helm's native `crds/` directory is install-only on upgrade (this is deliberate Helm behavior). To apply CRD schema changes on an existing install, apply the new CRDs explicitly or let a GitOps tool re-apply them:
* chore(deps-dev): bump esbuild from 0.25.12 to 0.28.1 in /examples/services/greeter in the npm_and_yarn group across 1 directory by @dependabot[bot] in https://github.com/restatedev/restate-operator/pull/149
13
-
* Align generated Pkl bindings; pin and fix the Pkl generator by @pcholakov in https://github.com/restatedev/restate-operator/pull/152
14
-
* Release 2.7.0: RestateCluster pod lifecycle, sidecars, extra volumes by @pcholakov in https://github.com/restatedev/restate-operator/pull/156
43
+
### Highlights
44
+
45
+
- **Pod lifecycle, sidecars, and extra volumes on `RestateCluster`** — five new optional `spec.compute` fields (`lifecycle`, `sidecars`, `terminationGracePeriodSeconds`, `extraVolumes`, `extraVolumeMounts`) are passed through to the StatefulSet pod template, enabling graceful-shutdown hooks, companion containers, and mounting reusable content next to Restate.
46
+
47
+
### Pod lifecycle, sidecars, termination grace period, and extra volumes
48
+
49
+
Five new optional fields on `RestateCluster` `spec.compute` pass through to the underlying StatefulSet pod template:
50
+
51
+
- `lifecycle`— container lifecycle hooks (`postStart` / `preStop`) for the Restate container.
52
+
- `sidecars`— native sidecar containers that run alongside Restate (started before it, terminated after it). Requires Kubernetes 1.29+ (GA in 1.33).
53
+
- `terminationGracePeriodSeconds`— overrides the pod termination grace period (previously hardcoded to 60 seconds).
54
+
- `extraVolumes`— additional pod volumes alongside the operator-managed ones.
55
+
- `extraVolumeMounts`— additional volume mounts for the Restate container.
56
+
57
+
These let you wire in graceful-shutdown hooks, run companion containers (log shippers, proxies, metrics exporters), and tune the shutdown window for your workload.
All five fields are optional — omitting them preserves previous behavior (no lifecycle hooks, no sidecars, no extra volumes, 60s grace period). Volume and mount name collisions with operator-managed resources are rejected at reconcile time with a clear error.
86
+
87
+
### Upgrading
88
+
89
+
Apply the updated CRDs and upgrade the operator via Helm:
Copy file name to clipboardExpand all lines: docs/server/deploy/kubernetes.mdx
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,6 +154,78 @@ Both fields are propagated to the `StatefulSet` pod template and are merged with
154
154
155
155
This is useful for integrations that rely on pod-level metadata, such as GKE ComputeClass scheduling (cloud.google.com/compute-class), Vault agent injection, Datadog, Prometheus scraping, and custom scheduling constraints.
156
156
157
+
### Pod lifecycle hooks, sidecars, and extra volumes
158
+
159
+
`RestateCluster` `spec.compute` supports several optional fields for advanced pod configuration:
160
+
161
+
- `lifecycle`— container lifecycle hooks (`postStart` / `preStop`) for the Restate container.
162
+
- `sidecars`— native sidecar containers that start before and stop after the Restate container (requires Kubernetes 1.29+).
163
+
- `terminationGracePeriodSeconds` — overrides the pod termination grace period (default: 60s).
164
+
- `extraVolumes`— additional pod volumes mounted alongside operator-managed volumes.
165
+
- `extraVolumeMounts`— additional volume mounts on the Restate container.
166
+
167
+
These fields are useful for running log shippers, metrics exporters, or proxies alongside Restate, and for wiring graceful-shutdown scripts:
All five fields are optional. Volume and mount names that conflict with operator-managed resources are rejected at reconcile time with a clear error.
196
+
197
+
### Automatic cluster provisioning
198
+
199
+
Set `spec.cluster.autoProvision: true` to have the operator automatically provision the Restate cluster once the pods are running. This calls the gRPC `ProvisionCluster` API and tracks the result in `status.provisioned` to prevent repeated calls.
200
+
201
+
```yaml
202
+
spec:
203
+
cluster:
204
+
autoProvision: true
205
+
config: |
206
+
# when using autoProvision, disable Restate's own auto-provision to avoid split brain
207
+
auto-provision = false
208
+
# ... rest of your config
209
+
```
210
+
211
+
<Warning>
212
+
When `cluster.autoProvision: true` is set, you must also set `auto-provision = false` in your Restate config to avoid a split-brain situation where both the operator and Restate try to provision the cluster simultaneously.
213
+
</Warning>
214
+
215
+
### Trusted CA certificates
216
+
217
+
When Restate needs to call services that use a private certificate authority, you can configure custom trusted CA certificates via `spec.security.trustedCaCerts`:
218
+
219
+
```yaml
220
+
spec:
221
+
security:
222
+
trustedCaCerts:
223
+
- secretName: internal-ca
224
+
key: ca.pem
225
+
```
226
+
227
+
The operator adds an init container that merges your custom CAs with the system CA bundle and sets `SSL_CERT_FILE` on the Restate container.
228
+
157
229
## Helm Chart
158
230
159
231
For a more bare-bone deployment of a Restate cluster, you can use the Helm chart.
Copy file name to clipboardExpand all lines: docs/services/deploy/kubernetes.mdx
+69-5Lines changed: 69 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,31 @@ The Restate Operator can help you connect your services to Restate Cloud by mana
75
75
Or check out the [Restate Cloud documentation](/cloud/connecting-services#kubernetes-services) for more information.
76
76
</Info>
77
77
78
-
### Automatic Service Versioning
78
+
### In-process tunnel mode
79
+
80
+
For services running in private networks that need to connect to a Restate Cloud environment without inbound networking, set `spec.restate.tunnelMode: in-process`. With this mode, your pods hold their own outbound tunnel connections to Restate Cloud — for example using the `@restatedev/restate-sdk-tunnel` npm package — instead of being reached through the tunnel-client sidecar and each version's Service.
81
+
82
+
```yaml
83
+
spec:
84
+
restate:
85
+
register:
86
+
cloud: my-cloud-environment
87
+
tunnelMode: in-process
88
+
```
89
+
90
+
When `tunnelMode: in-process` is set, the operator injects these environment variables into every container:
91
+
- `RESTATE_INPROC_TUNNEL_NAME`— the versioned name of the revision
92
+
- `RESTATE_INPROC_ENVIRONMENT_ID`— the Restate Cloud environment ID
93
+
- `RESTATE_INPROC_CLOUD_REGION`— the cloud region
94
+
- `RESTATE_INPROC_SIGNING_PUBLIC_KEY`— for request verification
95
+
96
+
Mount your API key Secret and point `RESTATE_INPROC_AUTH_TOKEN_FILE` at it — this variable is reserved for your own Secret mount and is not injected by the operator.
97
+
98
+
<Note>
99
+
In-process tunnel mode is not supported with Knative deployments.
100
+
</Note>
101
+
102
+
### Automatic service versioning
79
103
Versioning gets handled automatically by the operator by keeping old ReplicaSets around with an associated Service object so that in-flight invocations can drain against the old code versions.
80
104
81
105
Have a look at the [versioning documentation](/services/versioning#automatic-versioning-with-kubernetes-operator) to learn more.
@@ -151,9 +175,49 @@ Note that there is no need for routing to be sticky, because each invocation is
151
175
No context is assumed to be sticky on the node.
152
176
However, if you wish to do so, you can do sticky routing via the invocation ID in your request headers (`x-restate-invocation-id`).
153
177
154
-
## Knative Deployment
178
+
## Knative deployment
179
+
180
+
Restate supports Knative Serving as a deployment target. Knative enables scale-to-zero when there are no in-flight invocations and automatically configures an L7 load balancer.
181
+
182
+
### Knative with the Restate Operator (recommended)
183
+
184
+
The Restate Operator supports Knative Serving as an alternative to ReplicaSet mode. This gives you the operator's automatic registration and versioning on top of Knative's autoscaling capabilities.
185
+
186
+
Set `spec.serving.knative: true` in your `RestateDeployment`:
187
+
188
+
```yaml
189
+
apiVersion: restate.dev/v1beta1
190
+
kind: RestateDeployment
191
+
metadata:
192
+
name: service
193
+
spec:
194
+
serving:
195
+
knative: true
196
+
restate:
197
+
register:
198
+
cluster: restate
199
+
template:
200
+
spec:
201
+
containers:
202
+
- name: service
203
+
image: path.to/yourrepo:yourtag
204
+
ports:
205
+
- containerPort: 9080
206
+
name: h2c
207
+
```
208
+
209
+
**Tag-based versioning**: use the `tag` field to control whether a pod template change creates a new versioned revision or updates in place:
210
+
- **Same tag**: updates are applied in-place (no new version, no drain cycle).
211
+
- **Changed tag**: treated as a new version — old revision drains while new revision handles new requests.
212
+
- **No tag**: auto-versioning (every pod template change creates a new version).
213
+
214
+
<Note>
215
+
Knative Serving must be installed on the cluster. In-process tunnel mode (`tunnelMode: in-process`) is not supported with Knative deployments.
216
+
</Note>
217
+
218
+
### Knative without the operator
155
219
156
-
Restate supports Knative services. Knative allows scaling to zero when there are no in-flight invocations and automatically configures an L7 load balancer. There are no special requirements to deploy a service deployment container with Knative:
220
+
There are no special requirements to deploy a Restate service container with Knative directly:
157
221
158
222
```shell
159
223
kn service create service-name --port h2c:9080 --image path.to/yourrepo:yourtag
@@ -176,9 +240,9 @@ spec:
176
240
containerPort: 9080
177
241
```
178
242
179
-
The service will be accessible at `http://<service-name>.<namespace>` but to handle [versioning](/services/configuration), it is preferable to register the new revision url like `http://<service-name>-0001.<namespace>` as part of your deployment workflow.
243
+
The service will be accessible at `http://<service-name>.<namespace>`. To handle [versioning](/services/versioning), register the revision-specific URL (e.g. `http://<service-name>-0001.<namespace>`) as part of your deployment workflow.
180
244
181
-
By default Knative exposes the service through the Ingress. This is not required by Restate, and you can disable this behavior adding the argument `--cluster-local` to the aforementioned creation command.
245
+
By default Knative exposes the service through the Ingress. This is not required by Restate, and you can disable this behavior by adding the `--cluster-local` argument to the creation command.
182
246
183
247
<Info>
184
248
Learn more about deploying Restate services with Knative by reading this [blog post](https://www.restate.dev/blog/building-stateful-serverless-applications-with-knative-and-restate) and the [Golang example](https://github.com/restatedev/examples/tree/main/go/integrations/knative-go).
Copy file name to clipboardExpand all lines: docs/services/versioning.mdx
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,30 @@ The operator handles the complete versioning lifecycle:
62
62
63
63
For complete examples and specifications, see [Restate Operator git repo](https://github.com/restatedev/restate-operator).
64
64
65
+
### Per-version autoscaling during drain
66
+
67
+
By default, draining versions hold their full replica count for the entire drain window, which can last hours for long-running workflows. To reduce compute cost during drains, add a `spec.autoscaling` block to your `RestateDeployment`. The operator creates a `HorizontalPodAutoscaler` per non-latest version while it is still active, and removes it once the version is fully drained.
68
+
69
+
```yaml
70
+
spec:
71
+
autoscaling:
72
+
minReplicas: 1
73
+
maxReplicas: 10
74
+
metrics:
75
+
- type: Resource
76
+
resource:
77
+
name: cpu
78
+
target:
79
+
type: Utilization
80
+
averageUtilization: 70
81
+
```
82
+
83
+
The `spec.autoscaling` block is optional. When omitted, draining versions stay at their full `replicas` count as before. The **latest** version is not covered here — use a separate HPA targeting the `RestateDeployment` scale subresource for the latest version.
84
+
85
+
<Note>
86
+
Per-version autoscaling is only available in ReplicaSet mode. It is not supported in Knative mode, where Knative's own autoscaler manages scaling.
87
+
</Note>
88
+
65
89
## Manual versioning
66
90
67
91
For non-FaaS deployments, you can use either the UI or the CLI to manage deployments. The typical update flow looks like this:
Copy file name to clipboardExpand all lines: docs/snippets/common/install-restate-operator.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,11 @@ Install the Restate Operator via Helm:
2
2
3
3
```bash
4
4
helm install restate-operator \
5
-
oci://ghcr.io/restatedev/restate-operator-helm \
5
+
restatedev/restate-operator \
6
6
--namespace restate-operator \
7
7
--create-namespace
8
8
```
9
9
10
+
The Helm chart installs the CRDs (`RestateCluster`, `RestateDeployment`, `RestateCloudEnvironment`) automatically. To manage CRDs externally (GitOps / ArgoCD), set `installCrds: false` in your values.
11
+
10
12
To install the operator, you need to be able to create namespaces and CRDs.
0 commit comments