Resources / ControllerPlacement
ControllerPlacement
How many instances of one of the platform's controllers must exist, on which classes of machine, and with which program. The placement controller creates the Compute processes, spreads them over distinct machines and replaces an instance whose machine or heartbeat is lost. Platform processes only.
Overview
| API | platform.etorm.com/v1alpha1 |
| Resource | controllerplacements (cluster-scoped inside its cluster) |
| Short names | cplace |
| Available in | the platform and project clusters |
| Status | written by a controller through /status |
Minimal example
apiVersion: platform.etorm.com/v1alpha1
kind: ControllerPlacement
metadata:
name: example
spec:
controller: "<controller>"
program:
name: "<name>"
Spec
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
controller | string | yes | length 1 to 63 | The controller this placement runs, for example cloud-operator (a DNS label; the processes are named after it). | |
program | object | yes | The Compute program every instance runs. | ||
program.name | string | yes | length 1 to 63 | Name of the program. | |
program.system | boolean | true | True for a program of the platform (a system program). | ||
replicas | integer | 2 | 2 to 8 | How many instances. At least two, on distinct machines, so that no controller is a single point of failure. | |
hostClasses | list of string | ["cloud-node"] | up to 8 items | The classes of machine that may host an instance: cloud-node (an external-capacity node), or the class of a Host (lab, server, relay, node). A Host that is not steady is never a target. | |
config | object | Settings every instance reads by key (not secret). | |||
secrets | list of object | up to 32 items | Secrets every instance may read (as the secrets of a Process, spec 0021). | ||
secrets[].secretRef | object | yes | |||
secrets[].secretRef.name | string | yes | length 1 to 63 | Name of the secret. | |
secrets[].keys | list of string | up to 32 items | Only these keys; none: all. | ||
secrets[].as | object | yes | Delivery: host. | ||
secrets[].as.host | object | ||||
resources | object | {} | What each instance may use. | ||
resources.memoryPower | integer | 8 | 0 to 12 | Memory as a power of two of 64 KiB (8 is 16 MiB). | |
resources.cpuMillicores | integer | 200 | 1 to 1000 | Processor time on average, in thousandths of a core. | |
resources.maxCpuMillicores | integer | 1 to 1000 | The most a remediation may raise the allowance to. | ||
heartbeatSeconds | integer | 300 | 300 to 3600 | The interval of an instance's heartbeat (the node host reports a process at least this often); an instance silent for three of them is replaced. |
Status
| Field | Type | Required | Default | Allowed | Description |
|---|---|---|---|---|---|
phase | string | Pending, Ready (every instance placed and heard from) or Degraded. | |||
running | integer | Instances placed and heard from. | |||
instances | list of object | One entry per instance. | |||
instances[].process | string | The Compute process. | |||
instances[].host | string | The machine it is placed on. | |||
instances[].program | string | The program it runs. | |||
instances[].lastSeen | integer | Unix time of the last heartbeat of the machine that hosts it. | |||
instances[].state | string | Placed, Starting, HeartbeatMissing or Unplaced. | |||
conditions | list of object | Detailed state: Ready, and Degraded with HeartbeatMissing or NoCapacity. | |||
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 |
|---|---|
| Controller | .spec.controller |
| Replicas | .spec.replicas |
| Running | .status.running |
| Phase | .status.phase |