Skip to content

Add support for configuring Restate cluster nodes #83

@pcholakov

Description

@pcholakov

The Operator should assist with Restate Cluster configuration and bootstrap. Currently (as of v2.1.0), the extent of the support it offers to create a headless service for the node-to-node port 5122, which makes pod addresses resolvable over local DNS by other pods.

Actually using this still requires a lot of explicit Restate config, which the operator does not attempt to help with. At a minimum, one has to export something like:

RESTATE_ADVERTISED_ADDRESS="http://$(POD_NAME).restate-cluster.$(POD_NAMESPACE).svc.cluster.local:5122"

And use code to enumerate and construct the peer addresses on startup:

for i in $(seq 0 $((REPLICAS - 1))); do
  if [ $i -gt 0 ]; then
    addresses="${addresses},"
  fi
  addresses="${addresses}\"http://restate/-${i}.restate-cluster.${POD_NAMESPACE}.svc.cluster.local:5122\""
done

export RESTATE_METADATA_CLIENT__ADDRESSES="[$addresses]"

Additionally, the operator could assist with provisioning the cluster once the prerequisite number of nodes are up and available when using Raft metadata stores. (Automatic provisioning is a bad idea there as startup delays or partitions can cause multiple clusters to be provisioned independently.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions