SkyQualityMeter
A SkyQualityMeter measures the brightness of the sky: an INDI driver with AUX_INTERFACE that defines SKY_QUALITY. It belongs to the Observatory, or to one Telescope when it is mounted on it.
spec
One sky quality meter.
| Field | Type | Required | Description |
|---|---|---|---|
telescope |
string | no | The name of the Telescope that the device belongs to. Set this or observatory, not both. Optional. With neither telescope nor observatory, the device is on the shelf, and the operator creates nothing for it. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
observatory |
string | no | The name of the Observatory that the device belongs to, when no single telescope owns it. The device then runs on the observatory’s own INDI server. Set this or telescope, not both. Optional. With neither telescope nor observatory, the device is on the shelf, and the operator creates nothing for it. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
driver |
object | yes | The INDI driver that runs the device. With no image, the operator runs the image that the indi build lists for the driver, so name must then be an INDI driver that the image holds, such as indi_simulator_ccd. |
power |
object | no | The Switch output that powers the device. Activation switches the output on before the device’s pod starts, and deactivation switches it off after the pod stops. Optional. With no power, a person powers the device on and off by hand. |
claim |
object | no | A ResourceClaimSpec of the resource.k8s.io API, for real hardware. The operator creates a ResourceClaim from it for the device’s pod. The API server validates it when the operator creates the claim. Optional. A simulator needs no claim. |
activation |
[]object | no | The actions that run, in order, as this resource’s Telescope or Observatory turns Active, while every device is still connected. For a Telescope or an Observatory, that is the resource itself. The Reservation’s Activation step waits for them. Each action is a target state, so a run that an operator restart interrupted runs again each action that is not Done. Optional. |
deactivation |
[]object | no | The actions that run, in order, as this resource’s Telescope or Observatory stops being Active, while every device is still connected. For a Telescope or an Observatory, that is the resource itself. The Reservation’s Deactivation step waits for them. Each action is a target state, so a run that an operator restart interrupted runs again each action that is not Done. Optional. |
triggers |
[]object | no | Triggers on conditions. Each one runs its actions once for each transition of its condition to the status it names, while the resource is active: from when its activation is done until its deactivation begins. A condition that holds when the activation ends runs then. A run that began runs to its end, unless the resource’s deactivation begins, and a resource runs one procedure at a time. Optional. |
spec.driver
The INDI driver that runs the device. With no image, the operator runs the image that the indi build lists for the driver, so name must then be an INDI driver that the image holds, such as indi_simulator_ccd.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The driver’s executable, such as indi_simulator_ccd. The device’s pod runs it under socat, so the name holds no path, no space, no comma, and no colon. Pattern: ^[A-Za-z0-9_][A-Za-z0-9_.+-]*$. |
image |
string | no | The container image that holds the driver, used as written. The image must hold /usr/bin/socat and the driver on PATH, and must run as user 1000 with a read-only root filesystem and a writable /tmp. An image built FROM ghcr.io/liken-sh/indi meets all three. Optional. |
spec.power
The Switch output that powers the device. Activation switches the output on before the device’s pod starts, and deactivation switches it off after the pod stops. Optional. With no power, a person powers the device on and off by hand.
| Field | Type | Required | Description |
|---|---|---|---|
switch |
string | yes | The name of a Switch in this namespace. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
output |
integer | yes | The number of the output, from 1, as the driver numbers DIGITAL_OUTPUT_1. |
spec.activation[]
One action, which names job.
| Field | Type | Required | Description |
|---|---|---|---|
job |
object | no | A container that the operator runs once as a Kubernetes Job in the resource’s namespace, for what no other action does, such as switching a dew heater’s relay or posting to a webhook. The resource owns the Job. The action is Done when the Job succeeds, and Failed with the Job’s reason and message when it fails. The Job has no retry, and its activeDeadlineSeconds is the action’s timeout. Kubernetes deletes it an hour after it ends. The environment adds LIKEN_OBSERVATORY, LIKEN_TELESCOPE for a resource of a telescope, LIKEN_RESOURCE such as Dome/lab, LIKEN_TRIGGER such as activation or triggers[0], and INDI_HOST and INDI_PORT of the resource’s INDI server. The container runs as user 1000 with no capabilities, on a read-only root filesystem with a writable /tmp. The default timeout is 10 minutes. |
timeout |
string | no | How long the action may take, its waits for requires and after included, as a duration such as 20m. An action that passes it fails. Optional. Each action has a default. |
requires |
[]object | no | The conditions that must hold before the action runs. The operator waits for each one until the action’s timeout. They bind only the actions that the operator runs: a move that a person makes in KStars is stopped only by the drivers’ park locks. |
after |
[]object | no | The resources whose runs for the same event must end before the action runs: the same lifecycle step, or the same transition of the same condition. A resource with no such run is not waited for. A resource in a later tier of the tree is waited for until the action’s timeout, and the action then fails. |
spec.activation[].job
A container that the operator runs once as a Kubernetes Job in the resource’s namespace, for what no other action does, such as switching a dew heater’s relay or posting to a webhook. The resource owns the Job. The action is Done when the Job succeeds, and Failed with the Job’s reason and message when it fails. The Job has no retry, and its activeDeadlineSeconds is the action’s timeout. Kubernetes deletes it an hour after it ends. The environment adds LIKEN_OBSERVATORY, LIKEN_TELESCOPE for a resource of a telescope, LIKEN_RESOURCE such as Dome/lab, LIKEN_TRIGGER such as activation or triggers[0], and INDI_HOST and INDI_PORT of the resource’s INDI server. The container runs as user 1000 with no capabilities, on a read-only root filesystem with a writable /tmp. The default timeout is 10 minutes.
| Field | Type | Required | Description |
|---|---|---|---|
image |
string | yes | The container image, used as written, such as busybox:1.37. |
command |
[]string | no | The command that replaces the image’s entrypoint, as a container’s command does. Optional. |
args |
[]string | no | The arguments of the command, as a container’s args are. Optional. |
env |
[]object | no | Variables that the operator adds to the container’s environment before its own, as {name, value}. A variable that has the name of one of the operator’s own is replaced by the operator’s. Optional. |
spec.activation[].job.env[]
One variable.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The variable’s name, such as RELAY_URL. Pattern: ^[-._a-zA-Z][-._a-zA-Z0-9]*$. |
value |
string | yes | The variable’s value. It can be empty. |
spec.activation[].requires[]
One condition, and the status it must have.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | no | The kind of the resource whose condition it reads. With no kind, the condition is the resource’s own. A kind of Observatory or Telescope with no name means the resource’s own observatory or telescope. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource, in this namespace. A device kind needs a name. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
type |
string | yes | The condition’s type, such as Safe or Parked. |
status |
string | no | The status that the condition must have: True, False, or Unknown. The default is True. One of: True, False, Unknown. Default: True. |
spec.activation[].after[]
One resource, by its kind and name.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | yes | The kind of the resource. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource. With no name, the reference names every resource of the kind in the observatory, or the resource’s own Observatory or Telescope. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
spec.deactivation[]
One action, which names job.
| Field | Type | Required | Description |
|---|---|---|---|
job |
object | no | A container that the operator runs once as a Kubernetes Job in the resource’s namespace, for what no other action does, such as switching a dew heater’s relay or posting to a webhook. The resource owns the Job. The action is Done when the Job succeeds, and Failed with the Job’s reason and message when it fails. The Job has no retry, and its activeDeadlineSeconds is the action’s timeout. Kubernetes deletes it an hour after it ends. The environment adds LIKEN_OBSERVATORY, LIKEN_TELESCOPE for a resource of a telescope, LIKEN_RESOURCE such as Dome/lab, LIKEN_TRIGGER such as activation or triggers[0], and INDI_HOST and INDI_PORT of the resource’s INDI server. The container runs as user 1000 with no capabilities, on a read-only root filesystem with a writable /tmp. The default timeout is 10 minutes. |
timeout |
string | no | How long the action may take, its waits for requires and after included, as a duration such as 20m. An action that passes it fails. Optional. Each action has a default. |
requires |
[]object | no | The conditions that must hold before the action runs. The operator waits for each one until the action’s timeout. They bind only the actions that the operator runs: a move that a person makes in KStars is stopped only by the drivers’ park locks. |
after |
[]object | no | The resources whose runs for the same event must end before the action runs: the same lifecycle step, or the same transition of the same condition. A resource with no such run is not waited for. A resource in a later tier of the tree is waited for until the action’s timeout, and the action then fails. |
spec.deactivation[].job
A container that the operator runs once as a Kubernetes Job in the resource’s namespace, for what no other action does, such as switching a dew heater’s relay or posting to a webhook. The resource owns the Job. The action is Done when the Job succeeds, and Failed with the Job’s reason and message when it fails. The Job has no retry, and its activeDeadlineSeconds is the action’s timeout. Kubernetes deletes it an hour after it ends. The environment adds LIKEN_OBSERVATORY, LIKEN_TELESCOPE for a resource of a telescope, LIKEN_RESOURCE such as Dome/lab, LIKEN_TRIGGER such as activation or triggers[0], and INDI_HOST and INDI_PORT of the resource’s INDI server. The container runs as user 1000 with no capabilities, on a read-only root filesystem with a writable /tmp. The default timeout is 10 minutes.
| Field | Type | Required | Description |
|---|---|---|---|
image |
string | yes | The container image, used as written, such as busybox:1.37. |
command |
[]string | no | The command that replaces the image’s entrypoint, as a container’s command does. Optional. |
args |
[]string | no | The arguments of the command, as a container’s args are. Optional. |
env |
[]object | no | Variables that the operator adds to the container’s environment before its own, as {name, value}. A variable that has the name of one of the operator’s own is replaced by the operator’s. Optional. |
spec.deactivation[].job.env[]
One variable.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The variable’s name, such as RELAY_URL. Pattern: ^[-._a-zA-Z][-._a-zA-Z0-9]*$. |
value |
string | yes | The variable’s value. It can be empty. |
spec.deactivation[].requires[]
One condition, and the status it must have.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | no | The kind of the resource whose condition it reads. With no kind, the condition is the resource’s own. A kind of Observatory or Telescope with no name means the resource’s own observatory or telescope. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource, in this namespace. A device kind needs a name. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
type |
string | yes | The condition’s type, such as Safe or Parked. |
status |
string | no | The status that the condition must have: True, False, or Unknown. The default is True. One of: True, False, Unknown. Default: True. |
spec.deactivation[].after[]
One resource, by its kind and name.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | yes | The kind of the resource. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource. With no name, the reference names every resource of the kind in the observatory, or the resource’s own Observatory or Telescope. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
spec.triggers[]
One trigger: a condition, and the actions it runs.
| Field | Type | Required | Description |
|---|---|---|---|
when |
object | yes | The condition, and the status that fires the trigger. |
run |
[]object | yes | The actions that run, in order. |
spec.triggers[].when
The condition, and the status that fires the trigger.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | no | The kind of the resource whose condition it reads. With no kind, the condition is the resource’s own. A kind of Observatory or Telescope with no name means the resource’s own observatory or telescope. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource, in this namespace. A device kind needs a name. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
type |
string | yes | The condition’s type, such as Safe or Parked. |
status |
string | no | The status that the condition must have: True, False, or Unknown. The default is True. One of: True, False, Unknown. Default: True. |
for |
string | no | How long the status must hold before the actions run, as a duration such as 20m. A change of the status before then cancels the run. Optional. |
spec.triggers[].run[]
One action, which names job.
| Field | Type | Required | Description |
|---|---|---|---|
job |
object | no | A container that the operator runs once as a Kubernetes Job in the resource’s namespace, for what no other action does, such as switching a dew heater’s relay or posting to a webhook. The resource owns the Job. The action is Done when the Job succeeds, and Failed with the Job’s reason and message when it fails. The Job has no retry, and its activeDeadlineSeconds is the action’s timeout. Kubernetes deletes it an hour after it ends. The environment adds LIKEN_OBSERVATORY, LIKEN_TELESCOPE for a resource of a telescope, LIKEN_RESOURCE such as Dome/lab, LIKEN_TRIGGER such as activation or triggers[0], and INDI_HOST and INDI_PORT of the resource’s INDI server. The container runs as user 1000 with no capabilities, on a read-only root filesystem with a writable /tmp. The default timeout is 10 minutes. |
timeout |
string | no | How long the action may take, its waits for requires and after included, as a duration such as 20m. An action that passes it fails. Optional. Each action has a default. |
requires |
[]object | no | The conditions that must hold before the action runs. The operator waits for each one until the action’s timeout. They bind only the actions that the operator runs: a move that a person makes in KStars is stopped only by the drivers’ park locks. |
after |
[]object | no | The resources whose runs for the same event must end before the action runs: the same lifecycle step, or the same transition of the same condition. A resource with no such run is not waited for. A resource in a later tier of the tree is waited for until the action’s timeout, and the action then fails. |
spec.triggers[].run[].job
A container that the operator runs once as a Kubernetes Job in the resource’s namespace, for what no other action does, such as switching a dew heater’s relay or posting to a webhook. The resource owns the Job. The action is Done when the Job succeeds, and Failed with the Job’s reason and message when it fails. The Job has no retry, and its activeDeadlineSeconds is the action’s timeout. Kubernetes deletes it an hour after it ends. The environment adds LIKEN_OBSERVATORY, LIKEN_TELESCOPE for a resource of a telescope, LIKEN_RESOURCE such as Dome/lab, LIKEN_TRIGGER such as activation or triggers[0], and INDI_HOST and INDI_PORT of the resource’s INDI server. The container runs as user 1000 with no capabilities, on a read-only root filesystem with a writable /tmp. The default timeout is 10 minutes.
| Field | Type | Required | Description |
|---|---|---|---|
image |
string | yes | The container image, used as written, such as busybox:1.37. |
command |
[]string | no | The command that replaces the image’s entrypoint, as a container’s command does. Optional. |
args |
[]string | no | The arguments of the command, as a container’s args are. Optional. |
env |
[]object | no | Variables that the operator adds to the container’s environment before its own, as {name, value}. A variable that has the name of one of the operator’s own is replaced by the operator’s. Optional. |
spec.triggers[].run[].job.env[]
One variable.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The variable’s name, such as RELAY_URL. Pattern: ^[-._a-zA-Z][-._a-zA-Z0-9]*$. |
value |
string | yes | The variable’s value. It can be empty. |
spec.triggers[].run[].requires[]
One condition, and the status it must have.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | no | The kind of the resource whose condition it reads. With no kind, the condition is the resource’s own. A kind of Observatory or Telescope with no name means the resource’s own observatory or telescope. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource, in this namespace. A device kind needs a name. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
type |
string | yes | The condition’s type, such as Safe or Parked. |
status |
string | no | The status that the condition must have: True, False, or Unknown. The default is True. One of: True, False, Unknown. Default: True. |
spec.triggers[].run[].after[]
One resource, by its kind and name.
| Field | Type | Required | Description |
|---|---|---|---|
kind |
string | yes | The kind of the resource. One of: Observatory, Telescope, OpticalTube, OpticalTrain, Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver, Guider. |
name |
string | no | The name of the resource. With no name, the reference names every resource of the kind in the observatory, or the resource’s own Observatory or Telescope. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$. |
status
What the operator observes. The operator writes it, and a person reads it.
| Field | Type | Required | Description |
|---|---|---|---|
observedGeneration |
integer | no | The metadata.generation of the spec that the operator last acted on. |
phase |
string | no | The device’s state in one word. Inventory: the device is on the shelf, with no parent, and the operator creates nothing for it. Idle: the device is installed, but no reservation of its telescope or its observatory is active, so it has no pod. Starting: a reservation’s activation began, or the device’s pod starts. Connecting: the operator asked the driver to connect. Connected: the driver reports the device connected. Disconnecting: the operator asked the driver to disconnect, or stops the pod. Error: a step failed, and the Ready condition gives the reason. One of: Inventory, Idle, Starting, Connecting, Connected, Disconnecting, Error. |
conditions |
[]object | no | Ready is True while the device is connected. ParentFound is False when a resource that the spec names, up to the Observatory, does not exist, and its message names the missing resource. A device on the shelf names no parent, and its ParentFound is True with the reason NoParent. While a device is connected, it also reports the state that the triggers of procedures read, by kind: a Dome Parked and Open (the shutter), a Mount Parked, a DustCap Open, a FlatPanel Lit (the light), a Camera Cooling (the cooler), and a WeatherStation Safe. A park, a shutter, or a cover that moves is Unknown with the reason Moving. Safe is False with the reason Warning or Danger. A device that is not connected has none of them. |
procedures |
[]object | no | The last run of each trigger of the resource’s procedures: activation, deactivation, and triggers[0] and so on for each item of spec.triggers. An operator that restarts resumes a run from this record. |
indiDevice |
string | no | The name that the driver gives its device on the INDI server, such as CCD Simulator. KStars shows this name. |
driver |
string | no | The driver that the device’s pod runs. |
image |
string | no | The image that the device’s pod runs, after the operator resolved it. |
pod |
string | no | The name of the device’s pod, while it exists. |
node |
string | no | The node that runs the device’s pod. |
properties |
[]object | no | Every property that the device defines, as the driver defines it, with the values of its last update. A vendor’s own properties are here, and no typed reading depends on one. The list holds no BLOB data. |
display |
object | no | The readings as a person reads them, with their units, for the printer columns. The numbers are in readings. |
readings |
object | no | What the meter reports, from SKY_QUALITY. A field is absent until the driver sends it. |
status.conditions[]
One condition, in the shape of metav1.Condition.
| Field | Type | Required | Description |
|---|---|---|---|
type |
string | yes | The condition’s name, such as Ready. |
status |
string | yes | Whether the condition holds: True, False, or Unknown. One of: True, False, Unknown. |
observedGeneration |
integer | no | The metadata.generation of the spec that the condition reflects. |
reason |
string | yes | One word in CamelCase for the cause. |
message |
string | yes | The cause, for a person to read. It can be empty. |
lastTransitionTime |
string | yes | When status last changed. A write with the same status keeps this time. |
status.procedures[]
The last run of one trigger.
| Field | Type | Required | Description |
|---|---|---|---|
trigger |
string | yes | The trigger: activation, deactivation, or triggers[0] for the first item of spec.triggers. |
since |
string | no | The transition time of the condition that started the run: the lastTransitionTime of Active for activation and deactivation. |
state |
string | yes | The run’s progress: Pending, Running, Done, Failed, or Skipped when it had nothing to do. One of: Pending, Running, Done, Failed, Skipped. |
startTime |
string | no | When the run began to run. |
stopTime |
string | no | When the run ended. |
summary |
string | no | What the run waits for or did. |
actions |
[]object | no | Each action of the run, in order. |
status.procedures[].actions[]
One action.
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | yes | The action as its YAML reads, such as state: Parked or cool: -10 °C within 0.5 °C. |
state |
string | yes | The action’s progress: Pending, Running, Done, Failed, or Skipped when it had nothing to do. One of: Pending, Running, Done, Failed, Skipped. |
startTime |
string | no | When the action began to run. |
stopTime |
string | no | When the action ended. |
summary |
string | no | What the action waits for or did. |
status.properties[]
One INDI property.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The property’s name, such as CCD_TEMPERATURE. |
label |
string | no | The label that the driver gives the property. |
group |
string | no | The group, or tab, that the driver puts the property in. |
type |
string | yes | The type of the members’ values. One of: Number, Switch, Text, Light, BLOB. |
permission |
string | yes | Whether a client can write the property: ro read-only, wo write-only, or rw read and write. One of: ro, wo, rw. |
state |
string | yes | The property’s state: Busy while the driver carries out a change, Ok or Alert when the change ends. One of: Idle, Ok, Busy, Alert. |
rule |
string | no | For a switch property, how many members can be on at once. One of: OneOfMany, AtMostOne, AnyOfMany. |
members |
[]object | no | The property’s members, in the driver’s order. |
status.properties[].members[]
One member of the property.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The member’s name, such as CCD_TEMPERATURE_VALUE. |
label |
string | no | The label that the driver gives the member. |
value |
string | no | The value as text: a number in the member’s format, On or Off for a switch, a state for a light, or the text. A BLOB member has no value here. |
min |
number | no | For a number, the least value that the driver accepts. |
max |
number | no | For a number, the greatest value that the driver accepts. |
step |
number | no | For a number, the step between values. Zero means any step. |
status.display
The readings as a person reads them, with their units, for the printer columns. The numbers are in readings.
| Field | Type | Required | Description |
|---|---|---|---|
brightness |
string | no | The sky’s brightness, such as 21.3 mag/arcsec². |
status.readings
What the meter reports, from SKY_QUALITY. A field is absent until the driver sends it.
| Field | Type | Required | Description |
|---|---|---|---|
brightness |
number | no | The sky’s brightness, in magnitudes per square arcsecond. A higher number is a darker sky. |