Skip to content

v2.7.0

Choose a tag to compare

@pcholakov pcholakov released this 07 Jul 15:04
0d41a96

Restate Operator v2.7.0 Release Notes

Highlights

  • 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. 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 runs postStart concurrently with the container
    entrypoint, so it is not a reliable "before Restate starts" hook; wrap the
    entrypoint via command/args for strict pre-start ordering.
  • sidecars — native sidecar containers. Each runs alongside the Restate container
    (started before it, terminated after it); the operator forces restartPolicy: 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 of 0 terminates immediately
    (SIGKILL, skipping any preStop hook).
  • 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-level extraVolumes.

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-control

Related: 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