Files
Adrian Duke 620a1ec697 simulation: Introduce particle CUE module for radicle-node
Adds a `radicle-node` particle CUE module to simulation. Partial for
brevity in review as the `cue.mod` files found in the NEXT commit are
less relevant and autogenerated by Timoni + CUE.

Creates a set of roles: `peer`, `seed`, `bootstrap` that can be arranged
into toplogies for deployment in a k8s system. Images are provided by
Radicle Garden via quay.io.
2026-05-11 12:53:17 +01:00

37 lines
973 B
CUE

package main
import (
"list"
"tool/cli"
"encoding/yaml"
"text/tabwriter"
)
_resources: list.Concat([timoni.apply.app, timoni.apply.test])
// The build command generates the Kubernetes manifests and prints the multi-docs YAML to stdout.
// Example 'cue cmd -t debug -t name=test -t namespace=test -t mv=1.0.0 -t kv=1.28.0 build'.
command: build: {
task: print: cli.Print & {
text: yaml.MarshalStream(_resources)
}
}
// The ls command prints a table with the Kubernetes resources kind, namespace, name and version.
// Example 'cue cmd -t debug -t name=test -t namespace=test -t mv=1.0.0 -t kv=1.28.0 ls'.
command: ls: {
task: print: cli.Print & {
text: tabwriter.Write([
"RESOURCE \tAPI VERSION",
for r in _resources {
if r.metadata.namespace == _|_ {
"\(r.kind)/\(r.metadata.name) \t\(r.apiVersion)"
}
if r.metadata.namespace != _|_ {
"\(r.kind)/\(r.metadata.namespace)/\(r.metadata.name) \t\(r.apiVersion)"
}
},
])
}
}