Skip to main content
A view tells Lumovi how to show a kind: which columns matter, how to tell whether an object is healthy, which facts to show, which objects it relates to, and which changes people make to it. It’s a YAML file, and data only: it reads fields with the same JSONPath CRD printer columns use, and changes objects only with the patches and objects it spells out. This guide builds a view for an in-house Database kind, step by step. Swap in your own kind’s group and fields as you go.
The example’s custom resource looks like this:
Its operator labels each database’s pods with platform.example.com/database: orders, and keeps its backups as DatabaseBackup objects labeled the same way.
1

Find the kind and its fields

Open API resources in the sidebar and find your kind. Note its API group (platform.example.com) and kind (Database). Then open an object of it, and look at its YAML tab: that’s where the paths you’ll use come from.
2

Create the file

Views live in ~/.lumovi/views. Every .yaml or .yml file there is read, and a file can hold several views (and add-ons) separated by ---.
Create ~/.lumovi/views/databases.yaml with the smallest view there is:
databases.yaml
In Lumovi, press ⌘R (Ctrl+R on Windows and Linux). API resources now shows databases.yaml as the kind’s View, and Lumovi uses the database icon for the kind.
3

Add columns

Columns come after the name and status, and replace the ones the API server prints.
type makes a column sort and read better: number right-aligns and sorts numerically, date reads like “2h ago” and sorts by time, boolean shows Yes or No, and count shows how many values a path finds.
4

Say what healthy means

Status rules are checked in order, and the first that applies decides the status. If none applies, Lumovi falls back to the usual conventions.
health is one of healthy, progressing, warning, critical or neutral: it picks the color, the icon, the sort order and the filter chip. label is what the status says, and detail shows on hover. Both are templates: {{ .path }} puts a value in, and ?? gives a fallback when the path finds nothing.
Comparisons ignore case, so even an unquoted equals: True, which YAML reads as a boolean, matches Kubernetes’ "True".
5

Add details

Details are facts shown in the detail panel’s Details section. They take the same fields as columns.
6

Link related objects

Links point to single objects, and appear under Related in the detail panel’s Overview: click one to open it. kind is a built-in kind (Secret, Pod, Node…), or a kind and its group (Certificate.cert-manager.io). The namespace is this object’s unless you set one.
A link whose kind or name comes out empty isn’t shown.
7

List what belongs to it

Related lists are the objects of another kind that belong to this one, found by their labels or a field selector. Each is a tab in the detail panel, with the kind’s usual columns.
  • A list of pods becomes the panel’s Pods tab, under its own name (Instances here), and brings Logs and Metrics tabs for those pods.
  • Every list needs labels or a fieldSelector, like 'spec.nodeName={{ .status.nodeName }}'.
  • Lists look in this object’s namespace unless you set a namespace. A list whose templates come out empty isn’t shown, since it would find the wrong objects.
8

Add actions

Actions patch the object, like kubectl patch. They show up in the object’s ⋯ menu, its right-click menu and the command palette; primary: true also makes one a button in the detail panel.
  • when offers an action only when it makes sense.
  • undo is a patch offered as Undo in the notification.
  • confirm asks first, with this text. Without it (and without inputs, or an object to create), the action runs at once.
  • {{ now }} is the current time, as Kubernetes writes times: handy for annotations a controller watches.
9

Ask for a value

An action can ask for values before it runs: text, a number, or a choice. Its templates use them as {{ input.name }}.
Resize… opens a dialog with a New size field, starting at the current size. The undo is filled in from the database as it was before, so Undo puts the old size back. A number input (type: number) gives a number, and a choice (type: choice) is one of its options, or of the values a from path finds.
10

Create objects

An action can create another object instead of patching this one, with create in place of patch:
Back up now… shows the backup as YAML before it’s created, with the name it will get, in the database’s namespace. Once it’s created, Open in the notification opens it. A value that’s a whole template copies what it finds, so spec: '{{ .spec }}' would copy the object’s whole spec. Creating can’t be undone from the notification.Every action checks your permissions first: it needs patch on the kind (or on its status, with subresource: status), or create on the kind it creates. It shows the equivalent command, kubectl patch or kubectl create, and can’t run in a read-only cluster.
11

Give it a place in the sidebar

An add-on gathers your kinds under one entry in the sidebar, with everything of them in one list and a tab for each. Add it to the same file, after a ---:
See Add-ons.
12

Reload and check

Press ⌘R. If something’s wrong, API resources says so at the top, with the file, the view and the field:
A view with a problem isn’t used at all, so the kind falls back to Lumovi’s own view or the API server’s columns until you fix it.

The whole view

databases.yaml

Good to know

  • Quote templates and filters in YAML. A value that starts with {{ must be in quotes, or YAML reads it as a map. Quote paths with brackets or double quotes in them too, like '.status.conditions[?(@.type=="Ready")].status'.
  • Your view wins, kind by kind. If you write a view for a kind Lumovi already has one for, yours replaces it for that kind; Lumovi’s view still covers its other kinds. To tweak a built-in one, copy it from Lumovi’s views and edit it.
  • Every kind of a group. kind: '*' with a group covers every kind of that group. A view for a kind itself wins over one for its group, and yours win over Lumovi’s. See Which view a kind uses.
  • Another folder. Set LUMOVI_VIEWS_DIR to read views from somewhere else, like a folder your team shares in a Git repository.
  • Limits. Lumovi reads up to 200 files from the folder (not its subfolders), each up to 256 KB.
In your cluster: views and add-ons everyone sees come from the chart’s views value, one entry per file. People can’t add their own from the browser. See Views for everyone.

View format

Every field, path, condition and template, in one place.

Built-in views

Examples from cert-manager, Argo CD, Flux and more.