• Stars
    star
    1,113
  • Rank 39,822 (Top 0.9 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 1 year ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.

timoni

release platforms build license SLSA 3

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.

The Timoni project strives to improve the UX of authoring Kubernetes configs. Instead of mingling Go templates with YAML like Helm, or layering YAML on top of each-other like Kustomize, 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.

Warning

Note that Timoni in under active development and is still in its infancy. The APIs and command-line interface may change in a backwards incompatible manner.

Get started

To get started with Timoni please visit the documentation website at timoni.sh.

Concepts

If you are familiar with Helm, a Timoni module is the equivalent of a chart, a Timoni bundle is the equivalent of an umbrella chart, and a Timoni instance is the equivalent of a Helm release.

Timoni Modules

A Timoni module contains a set of CUE definitions and constraints organised into a CUE module with an opinionated structure. 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.

Module structure:

β”œβ”€β”€ cue.mod
β”‚Β Β  β”œβ”€β”€ gen # Kubernetes types
β”‚Β Β  └── module.cue # Module metadata
β”œβ”€β”€ templates
β”‚Β Β  β”œβ”€β”€ config.cue # Config schema and default values
β”‚Β Β  β”œβ”€β”€ deployment.cue # Kubernetes Deployment template
β”‚Β Β  └── service.cue # Kubernetes Service template
β”œβ”€β”€ timoni.cue # Timoni entry point
└── values.cue # Timoni values placeholder

Module examples can be found at examples/podinfo and examples/redis.

Commands for working with local modules:

  • timoni mod init <module-name>
  • timoni mod lint <path/to/module>
  • timoni build <name> <path/to/module> -n <namespace>
  • timoni apply <name> <path/to/module> -f <path/to/values.cue> --dry-run --diff

Timoni modules are distributed as OCI artifacts and can be stored in container registries.

Commands for working with remote modules:

  • timoni mod push <path/to/module> oci://<module-url> -v <semver>
  • timoni mod pull oci://<module-url> -v <semver> -o <path/to/module>
  • timoni mod list oci://<module-url>

To learn more about modules, please read the docs.

Timoni Instances

A Timoni instance represent 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.

When instantiating a module, users can supply their own values.cue that gets merged with the defaults included in the module:

values: {
	ingress: {
		enabled:   true
		className: "nginx"
		host:      "app.example.com"
	}
	autoscaling: enabled: true
	monitoring: enabled:  true
}

Commands for working with instances:

  • timoni apply <name> oci://<module-url> -v <semver> -f <path/to/values.cue>
  • timoni delete <name> -n <namespace>
  • timoni list -n <namespace>
  • timoni inspect [module|values|resources] <name> -n <namespace>
  • timoni status <name> -n <namespace>

To learn more about instances, please read the docs.

Timoni Bundles

Timoni bundles offer a declarative way of managing the lifecycle of applications and their infra dependencies.

A Timoni bundle is a CUE file for defining a group of instances together with their values and module references:

bundle: {
	apiVersion: "v1alpha1"
	name: "podinfo"
	instances: {
		redis: {
			module: {
				url:     "oci://ghcr.io/stefanprodan/modules/redis"
				version: "7.0.12"
			}
			namespace: "podinfo"
			values: maxmemory: 256
		}
		podinfo: {
			module: url:     "oci://ghcr.io/stefanprodan/modules/podinfo"
			module: version: "6.3.5"
			namespace: "podinfo"
			values: caching: {
				enabled:  true
				redisURL: "tcp://redis:6379"
			}
		}
	}
}

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 apply -f bundle.cue -f bundle_extras.cue --dry-run --diff
  • timoni bundle delete -f bundle.cue -f bundle_extras.cue
  • timoni bundle build -f bundle.cue -f bundle_extras.cue

To learn more about bundles, please see the Bundle API documentation.

Contributing

Timoni is Apache 2.0 licensed and accepts contributions via GitHub pull requests. Please see the contributing guide for more information.

More Repositories

1

dockprom

Docker hosts and containers monitoring with Prometheus, Grafana, cAdvisor, NodeExporter and AlertManager
5,710
star
2

podinfo

Go microservice template for Kubernetes
Go
4,276
star
3

AspNetCoreRateLimit

ASP.NET Core rate limiting middleware
C#
2,977
star
4

swarmprom

Docker Swarm instrumentation with Prometheus, Grafana, cAdvisor, Node Exporter and Alert Manager
Shell
1,855
star
5

WebApiThrottle

ASP.NET Web API rate limiter for IIS and Owin hosting
C#
1,272
star
6

mgob

MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
Go
773
star
7

gitops-istio

A GitOps recipe for Progressive Delivery with Flux v2, Flagger and Istio
641
star
8

k8s-prom-hpa

Kubernetes Horizontal Pod Autoscaler with Prometheus custom metrics
Makefile
549
star
9

kustomizer

An experimental package manager for distributing Kubernetes configuration as OCI artifacts.
Go
272
star
10

MvcThrottle

ASP.NET MVC Throttling filter
C#
223
star
11

istio-gke

Istio service mesh walkthrough (GKE, CloudDNS, Flagger, OpenFaaS)
217
star
12

kube-tools

Kubernetes tools for GitHub Actions CI
Shell
190
star
13

k8s-scw-baremetal

Kubernetes installer for Scaleway bare-metal AMD64 and ARMv7
HCL
177
star
14

flux-local-dev

Flux local dev environment with Docker and Kubernetes KIND
CUE
142
star
15

mongo-swarm

Bootstrapping MongoDB sharded clusters on Docker Swarm
Go
127
star
16

aspnetcore-dockerswarm

ASP.NET Core orchestration scenarios with Docker
C#
119
star
17

istio-hpa

Configure horizontal pod autoscaling with Istio metrics and Prometheus
Dockerfile
103
star
18

helm-gh-pages

A GitHub Action for publishing Helm charts to Github Pages
Shell
97
star
19

flux-aio

Flux All-In-One experimental distribution made with Timoni
CUE
80
star
20

openfaas-flux

OpenFaaS Kubernetes cluster state management with FluxCD
HTML
79
star
21

dockerdash

Docker dashboard built with ASP.NET Core, Docker.DotNet, SignalR and Vuejs
JavaScript
69
star
22

gitops-linkerd

Progressive Delivery workshop with Linkerd, Flagger and Flux
Shell
62
star
23

gitops-helm-workshop

Progressive Delivery for Kubernetes with Flux, Helm, Linkerd and Flagger
Smarty
62
star
24

hrval-action

Flux Helm Release validation GitHub action
Shell
59
star
25

scaleway-swarm-terraform

Setup a Docker Swarm Cluster on Scaleway with Terraform
HCL
47
star
26

dockes

Elasticsearch cluster with Docker
Shell
45
star
27

flagger-appmesh-gateway

A Kubernetes API Gateway for AWS App Mesh powered by Envoy
Go
44
star
28

kjob

Kubernetes job runner
Go
43
star
29

gitops-progressive-delivery

Progressive delivery with Istio, Weave Flux and Flagger
41
star
30

gh-actions-demo

GitOps pipeline with GitHub actions and Weave Cloud
Go
38
star
31

eks-hpa-profile

An eksctl gitops profile for autoscaling with Prometheus metrics on Amazon EKS on AWS Fargate
36
star
32

faas-grafana

OpenFaaS Grafana
Shell
34
star
33

dockelk

ELK log transport and aggregation at scale
Shell
31
star
34

openfaas-gke

Running OpenFaaS on Google Kubernetes Engine
Shell
30
star
35

prometheus.aspnetcore

Prometheus instrumentation for .NET Core
C#
29
star
36

syros

DevOps tool for managing microservices
Go
28
star
37

gh-actions

GitHub actions for Kubernetes and Helm workflows
Dockerfile
27
star
38

gitops-app-distribution

GitOps workflow for managing app delivery on multiple clusters
Shell
22
star
39

gitops-kyverno

Kubernetes policy managed with Flux and Kyverno
Shell
20
star
40

gitops-appmesh

Progressive Delivery on EKS with AppMesh, Flagger and Flux v2
Shell
19
star
41

flux-workshop-2023

Flux Workshop 2023-08-10
17
star
42

dockerd-exporter

Prometheus Docker daemon metrics exporter
Dockerfile
17
star
43

caddy-builder

Build Caddy with plugins as an Ingress/Proxy for OpenFaaS
Go
16
star
44

jenkins

Continuous integration with disposable containers
Shell
16
star
45

swarm-gcp-faas

Setup OpenFaaS on Google Cloud with Terraform, Docker Swarm and Weave
HCL
16
star
46

nexus

A Sonatype Nexus Repository Manager Docker image based on Alpine with OpenJDK 8
16
star
47

podinfo-deploy

A GitOps workflow for multi-env deployments
14
star
48

es-curator-cron

Docker Alpine image with Elasticsearch Curator cron job
Shell
13
star
49

caddy-dockerd

Caddy reverse proxy for Docker Remote API with IP filter
Shell
12
star
50

openfaas-certinfo

OpenFaaS function that returns SSL/TLS certificate information for a given URL
Go
12
star
51

eks-contour-ingress

Securing EKS Ingress with Contour and Let's Encrypt the GitOps way
Shell
11
star
52

gomicro

golang microservice prototype
Go
10
star
53

ngrok

ngrok docker image
10
star
54

rancher-swarm-weave

Rancher + Docker Swarm + Weave Cloud Scope integration
HCL
9
star
55

swarm-logspout-logstash

Logspout adapter to send Docker Swarm logs to Logstash
Go
9
star
56

kubernetes-cue-schema

CUE schema of the Kubernetes API
CUE
7
star
57

openfaas-promq

OpenFaaS function that executes Prometheus queries
Go
7
star
58

appmesh-eks

AWS App Mesh installer for EKS
Smarty
6
star
59

fninfo

OpenFaaS Kubernetes info function
Go
5
star
60

alpine-base

Alpine Linux base image
Dockerfile
4
star
61

gloo-flagger-demo

GitOps Progressive Delivery demo with Gloo, Flagger and Flux
4
star
62

k8s-grafana

Kubernetes Grafana v5.0 dashboards
Smarty
4
star
63

appmesh-dev

Testing eks-appmesh-profile
Shell
3
star
64

stefanprodan

Blog source code and content
SCSS
3
star
65

AndroidDevLab

Android developer laboratory setup
Batchfile
2
star
66

my-k8s-fleet

2
star
67

RequireJsNet.Samples

RequireJS.NET samples
JavaScript
2
star
68

BFormsTemplates

BForms Visual Studio Project Template
JavaScript
2
star
69

EsnServiceBus

Service Bus and Service Registry implementation based on RabbitMQ
C#
2
star
70

klog

Go
2
star
71

homebrew-tap

Homebrew formulas
Ruby
1
star
72

goc-proxy

A dynamic reverse proxy backed by Consul
Go
1
star
73

evomon

Go
1
star
74

loadtest

Hey load test container
1
star
75

openfaas-colorisebot-gke-weave

OpenFaaS colorisebot on GKE and Weave Cloud
Shell
1
star
76

xmicro

microservice HA prototype
Go
1
star