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
Document cluster.autoProvision feature and update examples
- Add spec.cluster section to README with autoProvision field documentation
- Add warning about disabling other provisioning methods when using
operator-managed provisioning (via config or RESTATE_AUTO_PROVISION env var)
- Update all examples to use cluster.autoProvision: true with
auto-provision = false (minimal, Raft, S3 examples)
- Update auto-provision config documentation to emphasize it must be
false when using operator-managed provisioning
- Update networkPeers documentation to use 'node' instead of 'metrics'
- Add allowOperatorAccessToNode field documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+36-5Lines changed: 36 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ The `RestateCluster` CRD defines a Restate cluster. The operator watches for the
60
60
**All other traffic is denied by default.**
61
61
62
62
The default behaviour can be disabled with `spec.security.disableNetworkPolicies: true`.
63
-
Alternatively, you can add new allowed inbound callers of the Restate ports with `spec.security.networkPeers.{ingress,admin,metrics}`, which are arrays of [`NetworkPolicyPeer`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#networkpolicypeer-v1-networking-k8s-io).
63
+
Alternatively, you can add new allowed inbound callers of the Restate ports with `spec.security.networkPeers.{ingress,admin,node}`, which are arrays of [`NetworkPolicyPeer`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#networkpolicypeer-v1-networking-k8s-io).
64
64
You can allow new outbound destinations by adding to the `spec.security.networkEgressRules` list, which is an array of [`NetworkPolicyEgressRule`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#networkpolicyegressrule-v1-networking-k8s-io).
65
65
66
66
**NOTE**: Each cluster is created in its own namespace. Naming the cluster after an existing Namespace is supported, but deploying into namespaces with other applications is not recommended.
@@ -75,10 +75,14 @@ kind: RestateCluster
75
75
metadata:
76
76
name: restate-test
77
77
spec:
78
+
cluster:
79
+
autoProvision: true
78
80
compute:
79
81
image: restatedev/restate:1.5
80
82
storage:
81
83
storageRequestBytes: 2147483648# 2 GiB
84
+
config: |
85
+
auto-provision = false
82
86
```
83
87
84
88
For the full schema as a [Pkl](https://pkl-lang.org/) template see [`crd/RestateCluster.pkl`](./crd/RestateCluster.pkl).
@@ -92,6 +96,7 @@ More examples are available just below the spec that follows.
| `clusterName` | `string` | Sets the `RESTATE_CLUSTER_NAME` environment variable. Defaults to the object name. |
97
102
@@ -125,6 +130,28 @@ More examples are available just below the spec that follows.
125
130
126
131
---
127
132
133
+
#### `spec.cluster`
134
+
135
+
| Field | Type | Description |
136
+
|---|---|---|
137
+
| `autoProvision` | `boolean` | If `true`, the operator will automatically provision the cluster via gRPC after pods are running. Defaults to `false`. |
138
+
139
+
> ⚠️ **Important**: When `cluster.autoProvision` is set to `true`, you **must** disable all other forms of cluster provisioning:
140
+
> - Set `auto-provision = false` in `spec.config`, or set the `RESTATE_AUTO_PROVISION=false` environment variable
141
+
> - Do not use any sidecar containers or init containers that run `restatectl provision`
142
+
> - Do not manually provision the cluster
143
+
>
144
+
> Running multiple provisioning methods simultaneously can lead to split brain situations in the Restate cluster.
145
+
146
+
When enabled, the operator will:
147
+
1. Wait for the `restate-0` pod to be in `Running` state
148
+
2. Call the Restate gRPC `ProvisionCluster` API
149
+
3. Set `status.provisioned = true` to avoid repeated provisioning attempts
150
+
151
+
This feature is particularly useful for Raft-based metadata clusters where manual provisioning was previously required.
152
+
153
+
---
154
+
128
155
#### `spec.security`
129
156
130
157
| Field | Type | Description |
@@ -191,7 +218,7 @@ While the `config` field accepts any valid [Restate server configuration](https:
191
218
* `destination`: The S3 URI where snapshots will be stored (e.g., `s3://my-bucket/snapshots`).
192
219
* `snapshot-interval-num-records`: How many log records are processed in a particular partition before a new snapshot is taken.
193
220
194
-
* **`auto-provision`**: A boolean that controls whether the cluster should automatically initialize itself. This should be `true` for object-store metadata but `false` when using the `replicated` (Raft) metadata store, which requires manual provisioning.
221
+
* **`auto-provision`**: A boolean that controls whether the Restate node should automatically initialize itself. **When using `cluster.autoProvision: true` (recommended), this must be set to `false`.** If not using operator-managed provisioning, this can be `true` for object-store metadata but must be `false` for `replicated` (Raft) metadata store.
195
222
196
223
* **Resource Management**:
197
224
* `rocksdb-total-memory-size`: Sets the total memory allocated to RocksDB, which Restate uses for its internal state storage. Typically 75% of the memory requests for the pod is appropriate.
@@ -207,6 +234,8 @@ kind: RestateCluster
207
234
metadata:
208
235
name: restate-test
209
236
spec:
237
+
cluster:
238
+
autoProvision: true
210
239
compute:
211
240
replicas: 3
212
241
image: restatedev/restate:1.5
@@ -220,8 +249,7 @@ spec:
220
249
"metadata-server",
221
250
"http-ingress",
222
251
]
223
-
# auto-provision should not be turned on when using the raft metadata store
0 commit comments