Introduction to Timoni
Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm. It aims to improve the UX of authoring Kubernetes configs. Timoni relies on cuelang’s type safety, code generation, and data validation features to offer a better experience of creating, packaging, and delivering apps to Kubernetes.
Key Technologies and Dependencies
Timoni is built using the following technologies and dependencies:
- CUE Language: A powerful and extensible configuration language that enables type checking, code generation, and data validation.
- Semantic Versioning for Go: A versioning scheme that is compatible with the Semantic Versioning specification (SemVer).
- Go Logging Framework: A logging framework for Go that provides structured logging and support for multiple log targets.
- Open Container Image Distribution System: A system for distributing container images that supports multiple container registries.
- Colorful terminal output: A library for generating colorful terminal output in Go.
- Flux CLI utilities: A set of command-line utilities for working with Kubernetes.
- State Sync Adapter for Flux: A state synchronization adapter for Flux that enables real-time updates of Kubernetes resources.
- Google OpenAPI specification parser for Go: A library for parsing OpenAPI specification files in Go.
- Go container registry library: A library for working with container registries in Go.
- Kubernetes API client for Go: A client library for working with the Kubernetes API in Go.
Design Philosophy
Timoni has an opinionated structure and relies on CUE definitions and constraints to generate Kubernetes objects. A module accepts a set of values supplied by the user as values.cue files and outputs a set of Kubernetes objects that Timoni deploys on Kubernetes.
Timoni Modules
A Timoni module contains a set of CUE definitions and constraints organized into a CUE module. The module structure includes the following:
- gen: A directory containing Kubernetes APIs and CRDs schemas.
- pkg: A directory containing Timoni APIs schemas.
- module.cue: A file containing module metadata.
- templates: A directory containing Kubernetes templates.
- timoni.cue: A file containing the Timoni entry point.
- timoni.ignore: A file containing Timoni ignore rules.
- values.cue: A file containing Timoni values placeholder.
Module examples can be found at examples/minimal and examples/redis.
Timoni Instances
A Timoni instance represents a module instantiation on a Kubernetes cluster. A module can be installed multiple times on a cluster by giving its instances unique names per namespace.
Timoni Bundles
A Timoni bundle is a CUE file for defining a group of instances together with their values and module references. In the bundle files, you can use arithmetic operations, string interpolation, and everything else that CUE std lib supports.
Commands for working with bundles:
timoni bundle lint -f bundle.cue
timoni bundle build -f bundle.cue
Contributing
Timoni is Apache 2.0 licensed and accepts contributions via GitHub pull requests. Please see the contributing guide for more information.
Resources
- Timoni GitHub Repository
- Timoni Documentation
- Timoni CUE Schemas
- Timoni Image Reference
- CUE Language Documentation
- CUE Language Playground