schemas

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

Timoni CUE Schemas

The Timoni's CUE schemas are included in the modules generated with timoni mod init.

Schemas

Kubernetes Metadata
  • #Annotations - Schema for validating Kubernetes annotations.
  • Action - Values of action.timoni.sh annotations for controlling Timoni's apply behaviour.
  • #Labels - Schema for validating Kubernetes labels.
  • #StdLabel - Values of Kubernetes app.kubernetes.io labels.
  • #Metadata - Schema for generating Kubernetes metadata (name, namespace, annotations and labels), with automatic generation of app.kubernetes.io/managed-by, app.kubernetes.io/name and app.kubernetes.io/version labels.
  • #MetaComponent - Superset of #Metadata schema for Kubernetes namespaced objects, that appends the component name to metadata.name, and with automatic generation of app.kubernetes.io/component label.
  • #MetaClusterComponent - Superset of #Metadata schema for Kubernetes global objects, that appends the component name to metadata.name, and with automatic generation of app.kubernetes.io/component label.
  • #Selector - Schema for generating Kubernetes label selectors with automatic generation of app.kubernetes.io/name label.
  • #ObjectReference - Schema for generating Kubernetes object references based on apiVersion, kind, name and namespace.
Immutable ConfigMaps and Secrets
  • #ImmutableConfig - Schema for generating immutable Kubernetes ConfigMaps and Secrets. The metadata.name of the generated object is suffixed with the hash of the input data.
Container Image
  • #Image - Schema for generating a container image and pull policy from repository, tag and digest inputs.
  • #ImagePullSecret - Schema for generating a Kubernetes Secret of type kubernetes.io/dockerconfigjson from repository, username and password inputs.
Container Resource Requirements
  • #CPUQuantity - Schema for validating Kubernetes CPU resource requirements.
  • #MemoryQuantity - Schema for validating Kubernetes memory resource requirements.
  • #ResourceRequirements - Schema for generating container requests and limits from cpu and memory inputs.
Semantic Versioning
  • #SemVer - Schema for validating semantic versions and enforcing a minimum major and/or minor version.
Custom Health Checks
  • #HealthCheck - Schema for defining a custom readiness evaluation in CUE for Kubernetes custom resources that are not kstatus-compliant.
  • #HealthCheckForCondition - Schema for generating a health check for custom resources that signal readiness through status conditions.
  • #HealthCheckLibrary - Ready-made health checks for popular custom resources, grouped by API family under families, with all unifying every family. Currently, covers the Kubernetes Gateway API kinds from both the standard and the experimental channels under families.gatewayAPI, and the Cluster API core kinds under families.clusterAPI.
Timoni API

These schemas describe Timoni's own APIs and are the single source of truth used by the timoni CLI to validate bundles, runtimes and instances. They are exposed here so that they can be imported and reused in CUE projects.

  • #Bundle - Schema for validating a Timoni Bundle, i.e. the set of instances applied to a cluster.
  • #Runtime - Schema for validating a Timoni Runtime, i.e. the target clusters and the values fetched from their resources.
  • #RuntimeValue - Schema for a single Runtime value query.
  • #Timoni - Schema for a module's instance, holding the instance configuration and the Kubernetes resources to apply.

Vendoring

To update a module's schemas to the latest version, run the following command from within the module root:

timoni artifact pull oci://ghcr.io/stefanprodan/timoni/schemas:latest \
  --output cue.mod/pkg

To update the schemas and verify the signature with Cosign v2:

timoni artifact pull oci://ghcr.io/stefanprodan/timoni/schemas:latest \
  --verify=cosign \
  --certificate-identity-regexp="^https://github.com/stefanprodan/timoni.*$" \
  --certificate-oidc-issuer=https://token.actions.githubusercontent.com \
  --output cue.mod/pkg

Documentation

Overview

Package schemas embeds the Timoni CUE schemas so that they can be consumed by the Go API as the single source of truth, while also being published as the importable 'timoni.sh/core/v1alpha1' package.

Index

Constants

This section is empty.

Variables

FS embeds the published Timoni CUE schema tree (all API groups and versions under timoni.sh/). Consumers read their own subpath, e.g. "timoni.sh/core/v1alpha1/bundle.cue".

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL