Resources / Host
Host
One machine of the platform and what it must run. The agent on the machine starts on boot, reads this object and makes the machine match it: it starts what is missing, makes the gateway container carry its endpoint address and run the gateway agent, and joins the member containers to their VPCs. It reports what it found, and a coarse heartbeat.
Overview
| API | platform.etorm.com/v1alpha1 |
| Resource | hosts (cluster-scoped inside its cluster) |
| Short names | host |
| Available in | the platform only |
| Status | written by a controller through /status |
Minimal example
apiVersion: platform.etorm.com/v1alpha1
kind: Host
metadata:
name: example
spec: {}
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
class | string | "lab" | up to 63 characters | What kind of machine this is (lab, server, relay, node); placement uses it. | |
steady | boolean | false | Whether the machine is expected to be on all the time. A steady host that stops reporting is Unreachable. | ||
heartbeatSeconds | integer | 600 | 300 to 3600 | How often the agent writes its heartbeat when nothing else changed. Status is written when the observed state changes and at most this often otherwise, never on every pass. A host that missed three heartbeats is Unreachable. | |
agentArtifact | object | The agent build the host should run (informational until self-update exists). | |||
agentArtifact.name | string | up to 63 characters | Name of the artifact. | ||
agentArtifact.version | string | up to 63 characters | Version or digest. | ||
workloads | list of object | up to 64 items | The containers the machine runs, in the order they are brought up (the gateway first). | ||
workloads[].name | string | yes | length 1 to 63 | The container's name. | |
workloads[].image | string | up to 255 characters | The image it was made from (informational: the agent starts existing containers and does not make new ones). | ||
workloads[].role | string (one of) | "other" | gateway, member, other | gateway: carries the Gateway's endpoint address and runs the gateway agent. member: joins a VPC from its Account. other: only kept running. | |
workloads[].gateway | object | For role gateway. | |||
workloads[].gateway.name | string | yes | length 1 to 63 | The Gateway this container is. | |
workloads[].gateway.server | string | "https://api.etorm.com" | up to 255 characters | The API the gateway agent talks to. | |
workloads[].gateway.dir | string | "/tmp" | up to 255 characters | The directory in the container that holds the agent binary (etorm-v<N>), ca.pem, agent.token and gateway.key. | |
workloads[].member | object | For role member. | |||
workloads[].member.project | string | yes | length 1 to 63 | The project whose Account carries this container's WireGuard key (/tmp/key in the container; the Account is found by the key). |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
phase | string | Pending, Ready (everything the host should run runs and the members are connected), Degraded (something is missing or not connected) or Unreachable (set by the platform when the heartbeat stops). | |||
observed | object | What the agent found at its last change, without anything that changes on every pass (no handshake ages or counters). | |||
observed.containers | list of object | One entry per workload. | |||
observed.containers[].name | string | The container. | |||
observed.containers[].state | string | running, stopped or missing. | |||
observed.containers[].detail | string | For a member, connected or what is wrong; for the gateway, whether the endpoint address and the agent are in place. | |||
heartbeat | object | When the agent last wrote this status. Coarse, at most every spec.heartbeatSeconds. | |||
heartbeat.at | string | RFC 3339. | |||
heartbeat.unix | integer | The same in Unix seconds. | |||
conditions | list of object | Ready, and Degraded with the reason (Missing, NotConnected, NoAccount, AgentNotRunning). | |||
conditions[].type | string | Aspect. | |||
conditions[].status | string | True or False. | |||
conditions[].reason | string | Machine-readable reason. | |||
conditions[].message | string | Human-readable detail. |
Columns in listings
| Column | From |
|---|---|
| Class | .spec.class |
| Phase | .status.phase |
| Heartbeat | .status.heartbeat.at |