Telescope

A Telescope is a mount with its optics and its instruments. It has one INDI server, with its Mount and the devices of its trains, while a Reservation of it is active. KStars connects one Ekos profile to that server.

spec

Where the telescope is.

Field Type Required Description
observatory string yes The name of the Observatory that the telescope is in. Pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$.
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.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 state in one word. Idle: no reservation needs it, and nothing runs. Activating: a reservation’s activation steps run. Ready: everything it needs runs and is connected. Deactivating: a reservation’s deactivation steps run. Error: a step failed, and the Ready condition gives the reason. One of: Idle, Activating, Ready, Deactivating, Error.
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.
conditions []object no Ready is True while the telescope’s server runs and every device of the telescope is connected. ParentFound is False when the Observatory does not exist. Active is True from the start of its reservation’s Activation step until the start of its Deactivation step. Its lastTransitionTime is the transition that starts the activation and deactivation procedures.
server object no The telescope’s INDI server, while it runs. KStars and astrophotography-operator connect to its host and port.
reservation object no The active Reservation of this telescope.
tubes []string no Each OpticalTube of this telescope.
trains []object no Each OpticalTrain of this telescope, with its devices.
devices []object no Each device whose parent is this telescope.
display object no What the printer columns show.
guider object no The telescope’s Guider, and whether it is ready.

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.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.server

The telescope’s INDI server, while it runs. KStars and astrophotography-operator connect to its host and port.

Field Type Required Description
service string yes The name of the server’s Service.
host string yes The Service’s DNS name in the cluster.
port integer yes The INDI port of the Service, 7624.
pod string no The name of the server’s pod.
node string no The node that runs the server’s pod.

status.reservation

The active Reservation of this telescope.

Field Type Required Description
name string yes The reservation’s name.
holder string no The reservation’s spec.holder.

status.trains[]

One train.

Field Type Required Description
name string yes The train’s name.
opticalTube string no The train’s spec.opticalTube.
devices []object no Each device on the train.

status.trains[].devices[]

One device, with its phase.

Field Type Required Description
kind string yes The device’s kind. One of: Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver.
name string yes The device’s name.
phase string no The device’s status.phase. One of: Inventory, Idle, Starting, Connecting, Connected, Disconnecting, Error.

status.devices[]

One device, with its phase.

Field Type Required Description
kind string yes The device’s kind. One of: Mount, Camera, FilterWheel, Focuser, Rotator, DustCap, FlatPanel, PolarAligner, GPS, Dome, WeatherStation, SkyQualityMeter, Switch, Receiver.
name string yes The device’s name.
phase string no The device’s status.phase. One of: Inventory, Idle, Starting, Connecting, Connected, Disconnecting, Error.

status.display

What the printer columns show.

Field Type Required Description
guider string yes The Guider’s phase, and PHD2’s state while the operator reads it, such as Ready, Guiding. It is an empty string for a telescope with no Guider.

status.guider

The telescope’s Guider, and whether it is ready.

Field Type Required Description
name string yes The guider’s name.
ready boolean yes Whether the guider’s Ready condition is True.
reason string no The reason of the guider’s Ready condition.
phase string no The Guider’s status.phase. One of: Idle, Activating, Ready, Deactivating, Error.
state string no PHD2’s state, the Guider’s status.state. One of: Stopped, Selected, Calibrating, Guiding, LostLock, Paused, Looping.