v2.7.0
Restate Operator v2.7.0 Release Notes
Highlights
- Pod lifecycle, sidecars, and extra volumes on
RestateCluster— five new optionalspec.computefields (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. All fields are optional and defaults are unchanged.
New Features
Pod lifecycle, sidecars, termination grace period, and extra volumes
Five new optional fields on RestateCluster spec.compute are passed through to
the underlying StatefulSet pod template:
lifecycle— container lifecycle hooks (postStart/preStop) for the Restate
container. Note: Kubernetes runspostStartconcurrently with the container
entrypoint, so it is not a reliable "before Restate starts" hook; wrap the
entrypoint viacommand/argsfor strict pre-start ordering.sidecars— native sidecar containers. Each runs alongside the Restate container
(started before it, terminated after it); the operator forcesrestartPolicy: Always
so an entry behaves as a sidecar rather than a startup-blocking init container.
Requires Kubernetes 1.29+ (native sidecars GA in 1.33).terminationGracePeriodSeconds— overrides the pod termination grace period
(previously hardcoded to 60 seconds). A value of0terminates immediately
(SIGKILL, skipping anypreStophook).extraVolumes— additional pod volumes alongside the operator-managed ones.extraVolumeMounts— additional volume mounts for the Restate container; sidecars
carry their own mounts and share these pod-levelextraVolumes.
These let operators wire in graceful-shutdown hooks, run companion containers (log
shippers, proxies, metrics exporters) next to Restate with correct start/stop
ordering, and tune the shutdown window for their workload.
Volume and mount collisions are validated up front: an extraVolumes name that
reuses an operator-managed volume (storage, tmp, config, the trusted-CA
volumes, or the request-signing volumes), or an extraVolumeMounts entry that
reuses a path the operator already mounts on the Restate container, is rejected
with a clear InvalidRestateConfig error rather than an opaque API-server failure.
Impact on Users:
- Existing deployments: no impact — all five fields are optional and omitting them
preserves today's behaviour (no lifecycle hooks, no sidecars, no extra volumes,
60s grace period). - New deployments: opt in via
spec.compute.
Usage:
spec:
compute:
image: docker.restate.dev/restatedev/restate:latest
terminationGracePeriodSeconds: 120
extraVolumes:
- name: hooks
configMap:
name: node-state-control
defaultMode: 0755
extraVolumeMounts:
- name: hooks
mountPath: /node-state-control
readOnly: true
lifecycle:
preStop:
exec:
command: ["/bin/sh", "/node-state-control/pre-stop.sh"]
sidecars:
- name: log-shipper
image: log-shipper:latest
volumeMounts:
- name: hooks
mountPath: /node-state-controlRelated: PR #153
Upgrading
This release adds new optional fields to the RestateCluster CRD. Apply the
updated CRDs (server-side) and upgrade the operator via Helm:
helm upgrade restate-operator restatedev/restate-operator --version 2.7.0