Skip to main content

Nodes

Use nodes to configure the Tezos nodes running in your chart.

nodes is a dictionary where each key/value pair defines a statefulset and a number of instances thereof. The name (key) defines the name of the statefulset and will be the base of the pod names. The instances are defined as a list because their names are simply -N appended to the statefulsetname. Said names are typically kebab case.

Params at the statefulset level:

  • config: The "config" property should mimic the structure of a node's config.json. Run octez-node config --help for more info. If present at the statefulset level, it overrides it in node_globals.
  • env: A dictionary of containers mapped to a dictionary of env vars. The container name "all" will apply the env vars to all containers. The most specific wins. Find the names of the containers by examining an installed environment, or by looking at charts/tezos/templates/nodes.yaml. Please note that we truncate the protocol from the container name for bakers and accusers, so "baker-011-pthangz2" is configured using just "baker".
  • storage_size: The size of the PV.
  • resources: Resources specifications for the node. Optionally set resources and limits for octez node See: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  • images: Optional specification of images to use for the tezos node and baker. Options are "octez" with a tezos/tezos image. If no images are provided, the containers will default to the images defined in the "images" field up above.
  • runs: A list of containers to run. Options being octez_node, accuser, baker, logger and vdf.
  • local_storage: Use local storage instead of a volume. The storage will be wiped when the node restarts for any reason. Useful when faster IO is desired. Defaults to false.
  • local_storage_pv_size: The size of the persistent volume to store identity.json and peers.json when local_storage is enabled. Some cloud providers have minimum pv size requirements for which this value can be used. Default value is 1Gi.
  • labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ NOTE: the labels appType, node_class, and baking_node are set automatically for you.
  • node_selector: Specify a kubernetes node selector in key: value format for your tezos nodes.
  • rpc_readiness_probe: Attach a probe to the node. The probe checks whether the RPC service is responsive, which should always be the case. Defaults to true.
  • bootstrapped_readiness_probe: Checks whether the most recent block is less than 600 seconds old. Overrides rpc_readiness_probe. Defaults to True. True is good for RPC nodes, private nodes, and self-contained private chains. Recommended to set to False when bootstrapping a new chain with external bakers, such as a new test chain. Otherwise, the chain may become unreachable externally while waiting for other nodes to come online.
  • instances: A list of nodes to fire up, each is a dictionary defining:
    • bake_using_accounts: List of account names that should be used for baking.
    • authorized_keys: List of account names that should be used as keys to authenticate a baker to a signer. When a baker uses a remote signer that requires authentication, the relevant key from this list will be used to sign every signature request.
    • config: Same as the outer statefulset level config. It overrides the statefulset level.
    • is_bootstrap_node: Boolean for is this node a bootstrap peer.
    • identity: An optional map containing a pre-generated Tezos node identity. The identity file will be created at /var/tezos/node/data/identity.json. Required fields are peer_id, public_key, secret_key, and proof_of_work_timestamp.

Defaults are filled in for most of the above values. You can also provide global defaults for all nodes via a node_globals section which is also a dictionary. Currently, two keys are defined: config and env. These operate in the same way as the section in nodes going by the same name.

Example config:

node_globals:
config:
shell:
history_mode: full
env:
baker:
TEZOS_LOG: "* -> debug"
nodes:
rolling-baking-node:
config:
shell:
history_mode: rolling
env:
all:
TEZOS_CLIENT_UNSAFE_DISABLE_DISCLAIMER: "Y"
snapshot-downloader:
HTTP_PROXY: http://my-proxy.my-company.com:3128/
labels:
# Example labels you might use to specify certain attributes of your nodes.
peer_node: "true" # Forward P2P traffic to this node types instances
rpc_node: "true" # Forward RPC traffic to this node types instances
node_selector:
nodeSelectorKey: nodeSelectorValue
storage_size: 15Gi
images: # (optional field)
octez: tezos/tezos:v...
local_storage: false
runs:
- octez_node
- baker
resources:
requests:
memory: 16192Mi
limits:
memory: 16192Mi
instances:
- bake_using_accounts: [baker0]
is_bootstrap_node: true
# Note the following config section overrides the above one even
# if we make them the same in this example.
config:
shell:
history_mode: rolling
identity:
peer_id: id...
public_key: ...
secret_key: ...
proof_of_work_stamp: ...
rolling-node:
labels:
# Example labels you might use to specify certain attributes of your nodes.
peer_node: "true"
rpc_node: "true"
images: # (optional field)
octez: tezos/tezos:v...
runs: ["octez_node"]
instances:
- {}
- {}

The default configuration is:

node_globals:
config: {}
env: {}
nodes:
rolling-node:
storage_size: 100Gi
runs:
- octez_node
instances:
- is_bootstrap_node: false
config:
shell:
history_mode: rolling
metrics_addr: ["0.0.0.0:9932"]