Once a service exists (see Your First Service), you can change how it appears in the catalogue, where it can be used and how its forms behave. This page covers managing a service in the dashboard and the annotations and schema markers that control it.
Open Services in the sidebar of the organisation that owns the service. The first tab lists your own services; the Subscriptions tab lists services you consume from others. Each of your services has a menu (…) with:
The create and edit forms set what consumers see in the service catalogue:
| Field | Shown as |
|---|---|
| Title | The service’s name on its tile. |
| Short Description | The text on its tile. |
| Category | Used for sorting and search: Database, General, Infrastructure, Messaging, Monitoring, Security, Storage or Other. Defaults to General. |
| Documentation URL | A link in the service’s details. |
| Logo | The image on its tile. Upload a PNG, JPG or SVG file of up to 1 MB, or enter a URL. Uploads are stored on the KDP storage server. |
| Description | The full description in the service’s details. Markdown is supported. |
Some services only make sense in an organisation, or only in a project. Set the
catalog.kdp.k8c.io/disallow-workspace-types annotation on the Service to the kinds of workspace
where it must not be used: organization, project, or both, separated by a comma.
metadata:
annotations:
catalog.kdp.k8c.io/disallow-workspace-types: organization
With this annotation:
<Kind> cannot be created in a <type> workspace. Existing objects stay.KDP enforces this with an admission webhook that it sets up for the service. While the KDP controller manager is unavailable, creating any object of the service fails; see Operating KDP. Unknown values are ignored.
Consumers can’t read your Service object, only its catalogue entry. KDP copies labels and
annotations whose key starts with exactly catalog.kdp.k8c.io/ to the catalogue entry and leaves
out all others, including subdomains such as team.catalog.kdp.k8c.io/. Put anything consumers or
their tools should see under that prefix, and nothing you want to keep private.
The dashboard builds forms from your CRD’s schema. To turn a text field into a list to choose
from, filled from objects in the workspace, add a kdp:options block to the field’s description in
the CRD. With kubebuilder, put it in the Go doc comment of the field:
// The ConfigMap with the application's settings.
// <!-- kdp:options
// ---
// apiVersion: options.kdp.k8c.io/v1
// kind: FieldSource
// source: local
// path: /api/v1/namespaces/${LOCAL_NAMESPACE}/configmaps
// value: "{.metadata.name}"
// -->
ConfigMapName string `json:"configMapName,omitempty"`
The dashboard hides the block from the field’s help text. Its fields:
| Field | Meaning |
|---|---|
apiVersion, kind | Always options.kdp.k8c.io/v1 and FieldSource. |
source | local lists objects in the consumer’s workspace. vwcatalog lists objects through the service catalogue, across workspaces, with your service’s permissions. Defaults to local. |
path | The API path to list, starting with /. It can use ${LOCAL_WORKSPACE}, ${APIEXPORT_WORKSPACE} and ${LOCAL_NAMESPACE}. |
value | A JSONPath template for the value stored in the field, such as "{.metadata.name}". |
label | Optional JSONPath template for the text shown in the list. |
This works for string, integer and number fields, and for lists of them, which become
multi-selects. If the source returns nothing, the field becomes a normal input again. When an
object is edited, a stored value the source no longer offers is still shown, marked
(current value).