YAML guide
Reading time: 0 minute(s) (0 words)
This document explains how Nobl9 configurations are represented in the sloctl
API, and how you can express them in .yaml format.
Overall schema
High-level YAML schema for Nobl9
apiVersion: n9/v1alpha
kind: Agent | Annotation | AlertMethod | AlertPolicy | AlertSilence | BudgetAdjustment | DataExport | Project | Report | RoleBinding | Service | SLO |
metadata:
name: string # Mandatory
displayName: string # Optional
project: string # Optional
labels: # Map, optional
"key_1": # Label's key
- "value_1" # Label's value
annotations:
key: value # String, optional
spec:
...
Notes on the overall schema:
Field | Type | Description |
---|---|---|
metadata.name mandatory | string | Field following DNS RFC1123 conventions. Constraints: • Max. 63 characters. • Only lowercase alphanumeric characters or hyphens. • Must start and end with an alphanumeric character. |
metadata.project mandatory | string | Field following DNS RFC1123 conventions. Constraints: • Max. 63 characters. • Only lowercase alphanumeric characters or hyphens. • Must start and end with an alphanumeric character. |
metadata.displayName optional | string | Can contain max 63 characters. There's no additional validation. |
metadata.labels optional | map | Labels are key-value pairs that can be attached to SLOs, services, projects, and alert policies. Labels are used to select Nobl9 objects and find collections of Nobl9 objects. Constraints: • Labels must be in the "key": - "value" format (key=value in sloctl ).• key can contain only lowercase alphanumeric characters, underscores, and dashes; must start with a letter and end with an alphanumeric character; maximum length 63 characters.•Up to 30 labels per kind • value can contain Unicode characters; maximum length 200 characters. |
metadata.annotations optional | string | Metadata annotations are non-identifiable key-value pairs that can be attached to SLOs, services, projects, and alert policies. Metadata annotations are used for descriptive purposes only. Constraints: • Metadata annotations must be in the key: value format. |