Skip to main content
A view is a YAML document of kind View: it tells Lumovi how to show a kind. An add-on is a document of kind AddOn: it gives a tool an entry in the sidebar, with all its kinds on one page. This page lists everything both can say. For a guided introduction, see Write a view and Add-ons.

Files

A file can hold several documents separated by ---, views and add-ons in any mix. Each is checked on its own: one with a problem isn’t used, and the others are.

Which view a kind uses

Each kind gets one view. Lumovi takes the first it finds:
  1. Yours, for the kind.
  2. Yours, for every kind of its group (kind: '*').
  3. Lumovi’s, for the kind.
  4. Lumovi’s, for every kind of its group.
So your views replace Lumovi’s one kind at a time. If Lumovi’s view covers five kinds and yours covers one of them, the other four keep Lumovi’s. If two of your views name the same kind, the one read last wins: files are read in order of their names, and documents in the order they come in. Add-ons are matched by name instead: an add-on of yours replaces Lumovi’s add-on with the same metadata.name, whole. See Add-ons. API resources shows which view each kind uses: Lumovi, or the name of your file.

The document

string
required
Always lumovi.dev/v1alpha1.
string
required
View or AddOn.
string
required
Its name. It appears in problem messages, so make it recognizable. An add-on’s name is also its address, and what decides which of Lumovi’s add-ons yours replaces.
object
required
What it says: below for a view, and in Add-ons for an add-on. Any field it doesn’t know is a problem, so typos don’t go unnoticed.

spec

A view’s spec:
list
required
The kinds it’s for, at least one. Each is a kind and its API group. Leave out group for the core group’s kinds.
kind: '*' is every kind of a group, like the constraint kinds Gatekeeper makes, one for each of its templates. It needs a group. A view for a kind itself wins over one for its whole group.
Kinds Lumovi has a page of its own for, like Pods, Deployments and Secrets (see Resource kinds), keep their own icon, columns, status, details and tabs. A view of one only adds its actions.
string
The kind’s icon, one of the icons below.
list of fields
List columns, shown after the name and status. They replace the columns the API server prints for the kind. See Fields.
list of rules
How to tell whether an object is healthy. The first rule that applies decides. With no rule that applies, Lumovi reads the status from the usual conventions. See Status rules.
list of fields
Facts in the detail panel’s Details section. See Fields.
Single objects this one points to, listed under Related in the detail panel’s Overview. See Links.
Objects of other kinds that belong to this one, a tab each in the detail panel. See Related.
list of actions
Changes people can make: a patch of the object, or a new object to create. See Actions.

Fields

Columns and details are both fields.
string
required
The column’s header, or the fact’s name.
path
required
Where its value is. See Paths.
string
default:"string"
How it’s shown and sorted:
string
What to show when the path finds nothing.

Paths

Paths are the part of kubectl’s JSONPath that CRD printer columns use, starting with a dot. A path can also be written {.spec.x} or $.spec.x. When a path finds several values, they’re shown joined with commas.
In YAML, quote paths that contain brackets or double quotes, and anything that starts with {: '.status.conditions[?(@.type=="Ready")].status'.

Status rules

condition
When the rule applies. See Conditions. A rule without one always applies, which makes it a good last rule.
string
required
One of healthy, progressing, warning, critical or neutral. It decides the color, the icon, where the object sorts, and which filter chip counts it.
template
required
What the status says, like Ready or '{{ .status.phase }}'.
template
More about it, shown on hover, and in an add-on’s Message column.

Conditions

A condition reads one value at path, and compares it:
Comparisons ignore case, so equals: True matches Kubernetes’ "True" even though YAML reads an unquoted True as a boolean. When a path finds several values, the first is compared. A condition with more than one operator uses the first of exists, equals, notEquals, in and matches that it has. Conditions combine with all and any, nested as deep as you need:
A condition has exactly one of path, all or any.

Templates

A status rule’s label and detail, links, related lists, and actions’ texts, patches and new objects can include values from the object.

In patches and new objects

In a patch, an undo or an object to create, a value that’s a template and nothing else stands for the value itself, not its text:
  • A number stays a number, and a list or an object is copied whole: params: '{{ .spec.params }}' copies the object’s parameters.
  • When the template finds nothing, the field is left out (and a list item is dropped), rather than set to an empty string.
  • {{ now }} is always text, and so is everything under labels and annotations, which Kubernetes keeps as text.
A value with other text around its template, like '{{ .metadata.name }}-copy', is always text. Templates in undo are filled in from the object as it was before the action ran. So an undo can put back the value an action replaces: undo: { spec: { mode: '{{ .spec.mode }}' } }. Links are listed under Related in the detail panel’s Overview. Click one to open the object.
string
required
What the object is to this one, like Secret or Issuer.
template
required
How Lumovi names its kind: a built-in kind (Secret, Pod, Node…), or a kind and its API group (ClusterIssuer.cert-manager.io).
template
required
Its name.
template
Its namespace. This object’s unless set, and none for cluster-wide kinds.
A link whose kind or name comes out empty isn’t shown. Related lists are the objects of another kind that belong to this one: a node pool’s nodes, a database’s instances, a pipeline’s runs. Each is a tab of the detail panel, after Metrics, listing them with their kind’s usual columns. They’re also on the object’s Map.
string
required
The tab’s name, like Instances or Nodes.
template
required
Their kind, named as for links: Pod, NodeClaim.karpenter.sh.
map of templates
The labels they have, each value a template: cnpg.io/cluster: '{{ .metadata.name }}'.
template
A field selector they match, like 'spec.nodeName={{ .status.nodeName }}'.
template
Where to look. This object’s namespace unless set. Kinds without namespaces are looked for across the cluster, and so is everything related to an object that has no namespace.
A related list needs labels or a fieldSelector: without one, it would be every object of the kind. A list whose kind, label values or field selector values come out empty isn’t shown, since it would find the wrong objects. Like any list, it needs list on the kind. The first list of Pods is special: it becomes the panel’s Pods tab, under the list’s name (CloudNativePG’s Instances). It brings a Logs tab with their logs, merged, and a Metrics tab with their usage history.

Actions

Actions change the object with a patch, like kubectl patch, or create another object, like kubectl create. Each has a patch or a create, not both.
string
required
The action’s name, in menus and on its button.
object or list
A merge patch (an object), or, with type: json, a list of JSON patch operations. Templates work inside it.
object
An object to create instead, with templates. See Creating objects.
list of inputs
Values to ask for before it runs, at least one. See Inputs.
string
default:"merge"
merge or json. A merge patch is an object, and a JSON patch is a list; anything else is a problem.
string
status, to patch the object’s status subresource.
object or list
A patch that takes the change back, offered as Undo in the notification. Same type as patch, and filled in from the object as it was before. Actions that create have no undo.
template
Asks first, with this text.
template
The notification once it’s done. Without it, the notification is the action’s name and the object’s.
condition
Offer the action only when this holds.
boolean
Also show it as a button in the detail panel, not only in its menu.
boolean
It’s destructive: it’s shown in red, and its confirmation starts on Cancel.
string
One of the icons. Without one, an action gets a lightning bolt.

When an action asks first

An action runs at once, unless it has a confirm, inputs or a create. Then it opens a dialog first, and its name ends in ”…” in menus, like Back up now…. The dialog shows the confirm text, the inputs, what it would create, and the equivalent command. Its button has the action’s name.

Inputs

Inputs are values an action asks for, used in its templates as {{ input.name }}.
string
required
How templates name it: letters, digits and _, not starting with a digit, like replicas.
string
required
What the dialog calls it.
string
default:"text"
  • text: a text field.
  • number: a whole number from 0 to 1,000. In a patch, a template that’s only this input gives a number (except under labels and annotations).
  • choice: one of a few options, picked from a list.
list
A choice’s options: [Off, Initial, Recreate].
path
Where to read a choice’s options from instead, like '.status.instanceNames[*]'. When it finds nothing, the dialog says There’s nothing to choose from.
template
The value it starts with. Without one, a number starts at 0, and a choice on its first option.
A choice has options or from, not both, and other inputs have neither. Every input needs a value before the action can run. Templates in patch, create, confirm and done can only name inputs the action has.

Creating objects

create is an object to create, written as you’d write its YAML, with templates in it. It needs an apiVersion, a kind, and a metadata.name or metadata.generateName.
  • Its name. With generateName, Lumovi picks the random end of the name itself, the way the API server would, so the dialog shows the name it will get.
  • Its namespace. The object’s own, unless metadata.namespace says otherwise. Kinds without namespaces get none.
  • Copying. A template that’s a whole value copies it, lists and objects included, and leaves the field out when it finds nothing. Tekton’s Run again copies a run’s pipeline, parameters and workspaces this way: params: '{{ .spec.params }}'.
  • Before and after. The dialog shows the object as YAML first, under Creates with its kind and name. Once it’s created, Open in the notification opens it.
Creating something can’t be undone from the notification: delete what it made instead.

Permissions and commands

An action is enabled only when the cluster says your account may make the change: patch on the kind (or on its status, with subresource: status) for a patch, and create on the kind it creates for a create. Like every change, it shows the equivalent command, kubectl patch … or kubectl create -f <name>.yaml, and is refused in a read-only cluster.

Add-ons

An add-on gives a tool an entry in the sidebar, leading to a page with all its kinds: everything in one list, and a tab for each kind. See Add-ons.
An add-on’s metadata.name is its address (add-ons/platform). One of yours with the same name as one of Lumovi’s replaces it whole: its label, icon, place and kinds. Built-in views lists Lumovi’s add-ons and their names.
string
required
Its name in the sidebar, on its page and in the command palette.
list
required
Its kinds, at least one, in the order of their tabs. Written as a view’s kinds: kind: '*' is every kind of a group, each with a tab, in order of their names. Kinds Lumovi has a page of its own for, like Pods, Deployments or Secrets, can’t be in an add-on.
string
One of the icons. Without one, it gets the puzzle piece of custom resources.
string
A section of the sidebar for Kubernetes’ own kinds to sit in, at its end: cluster (Cluster), network (Network), config (Configuration) or storage (Storage). Without one, it’s under Add-ons.
An add-on only groups kinds. How each kind looks, its columns, status and actions, comes from its view, matched by kind.

Icons

Views can use these Lucide icons, for kinds, actions and add-ons: activity, archive, bell, box, boxes, bug, camera, cloud, database, file-check, flame, gauge, git-branch, git-merge, globe, hexagon, key-round, layers, lock, network, package, play, puzzle, radar, refresh-cw, rocket, route, scaling, server, server-cog, shield-check, signpost, timer, waves, waypoints, workflow

Problems

Lumovi checks every view and add-on before using it. One with a problem isn’t used at all, and API resources lists the problem at the top, under A view couldn’t be used (or how many problems there are), saying where it is: the file, the document’s number when it isn’t the first, its name and the field. A file that isn’t valid YAML shows the parser’s message, after the file’s name. Below the list, API resources says how many views are Lumovi’s and how many are yours, and where yours go, with How to write a view.