Resources / Diagram
Diagram
Infrastructure drawn as blocks with typed ports, joined by links. A controller builds what it describes.
Overview
| API | flow.etorm.com/v1alpha1 |
| Resource | diagrams (cluster-scoped inside its cluster) |
| Short names | dg |
| Available in | project clusters only |
| Status | written by a controller through /status |
Minimal example
apiVersion: flow.etorm.com/v1alpha1
kind: Diagram
metadata:
name: example
spec: {}
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
state | string (one of) | "Running" | Running, Stopped | Running (default): the diagram is realized. Stopped: what runs (processes, load balancers, ingress, DHCP and DNS services) is deleted; everything that holds data or an identity (VPCs, accounts, certificates, programs, buckets, databases, message brokers, repositories, boards, columns, cards) stays and keeps being reconciled. Start again by setting Running. | |
paused | boolean | Validate and report a plan in status.plan, change nothing. | |||
deletePolicy | string (one of) | Delete, Orphan | Delete (default): objects the diagram no longer describes, or that outlive it, are deleted. Orphan: the diagram never deletes; it releases them. | ||
modules | object (free-form) | Reusable sub-diagrams by name (declared typed inputs and outputs plus blocks and links); instantiated by blocks of type `module:<name>`, with `count` or `forEach` for loops. | |||
blocks | list of object | up to 500 items | The blocks: id, type, name (becomes the object name), canvas position and typed-in values. | ||
blocks[].id | string | yes | length 1 to 40 | ||
blocks[].type | string | yes | length 1 to 40 | ||
blocks[].name | string | yes | length 1 to 63 | ||
blocks[].x | number | ||||
blocks[].y | number | ||||
blocks[].params | object (free-form) | ||||
links | list of object | up to 2000 items | Arrows from an output port to an input port. | ||
links[].from | object | yes | |||
links[].from.block | string | yes | up to 40 characters | ||
links[].from.port | string | yes | up to 40 characters | ||
links[].to | object | yes | |||
links[].to.block | string | yes | up to 40 characters | ||
links[].to.port | string | yes | up to 40 characters |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
phase | string | Stopped, Starting, Running, Stopping or Failed; Invalid when the diagram does not validate (nothing is changed) and Paused with spec.paused. | |||
message | string | Why the diagram is Failed or Invalid (the first problem), else empty. | |||
blockCount | integer | Number of blocks in the diagram. | |||
observedGeneration | integer | The generation of the spec this status describes. | |||
issues | list of object | Problems that make the diagram invalid: level, message and, when known, the block and port. | |||
issues[].level | string | ||||
issues[].message | string | ||||
blocks | object (free-form) | Per block: phase, message, the object it built and the values of its outputs. | |||
plan | list of object | With spec.paused: what would change. | |||
conditions | list of object | Detailed state, one entry per aspect; Ready says whether the object is usable. | |||
conditions[].type | string | ||||
conditions[].status | string | ||||
conditions[].reason | string | ||||
conditions[].message | string |
Columns in listings
| Column | From |
|---|---|
| Blocks | .status.blockCount |
| State | .spec.state |
| Phase | .status.phase |