/kurly:kurlyfrom kurly
Compose Kubernetes workloads with kurly — a Jsonnet library of composable workload recipes on top of k8s-libsonnet. Use this when authoring or editing a workload in Jsonnet: start from a base kind (kurly.http / kurly.worker / kurly.cron / kurly.daemon), add capabilities as composable + features (kurly.store, kurly.config, kurly.expose.*, kurly.security.*, kurly.runAs, kurly.recreate, …), render with kurly.list, or start from a published workload under workloads/<name>/ and adapt it. Applies whenever a repo imports github.com/metio/kurly, when wiring a kurly workload into JaaS (JsonnetSnippet / JsonnetLibrary) and stageset-controller (StageSet), or when a kurly.* composition needs to render.
Ships in kurly. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
kurly (github.com/metio/kurly) is a Jsonnet library of Kubernetes workload
recipes built on k8s-libsonnet.
You start from a base kind and add capabilities as composable +
features:
local kurly = import 'github.com/metio/kurly/main.libsonnet';
kurly.list(
kurly.http('storefront', 'ghcr.io/acme/storefront:1.2.3') // the base
+ kurly.store('/var/lib/store', '5Gi') // features, any order
+ kurly.recreate()
+ kurly.security.baseline // security is a feature too
+ kurly.expose.gateway('storefront.example.com', 'shared') // so is exposure
)
A base kind returns an object whose hidden config:: holds every knob and whose
visible fields are the manifests, computed from that config. A feature is a
{ config+:: … } mixin — it only ever writes config, never a manifest — so the
manifests late-bind against the merged config regardless of compose order.
kurly.list(app) wraps every manifest (including hidden owned ones like the
store PVC and config ConfigMap) in a kind: List. It also takes an array to
assemble several parts into one list — kurly.list([cnpg(...), server(), cert])
— where apps expand to their manifests, bare manifests pass through, sublists
flatten, and if cond then … (null when false) drops out. kurly.join is the
same drop-and-flatten over a plain array.
The current documentation is at https://kurly.projects.metio.wtf/, with a
machine-readable index at /llms.txt and the whole site at /llms-full.txt.
For an exact feature, parameter, type, or default, prefer these over memory:
/catalog.json — the same
data, machine-readable (schemaVersion, kinds, features, expose, network,
security, workloads). Fetch and parse this when you need the precise API.kurly.http(name, image) — a Deployment (2 replicas) and a ClusterIP
Service. The only kind you can expose.kurly.worker(name, image) — a Deployment, no Service. Reaches out rather than
serving.kurly.cron(name, image, schedule) — a CronJob.kurly.daemon(name, image) — a DaemonSet (one pod per node).config. Never patch a manifest field from a
feature — a later feature that recomputes that manifest from config would
clobber it.kurly.expose.* recipe joins the
exposure exclusion group; composing two fails the render. Exposure also
requires a Service, so it only composes onto kurly.http — composing onto a
worker/cron/daemon fails with a requiresService assert.kurly.network.kubernetes /
.calico / .cilium firewall a workload with an allow-list written in the
neutral allowFrom/allowTo vocabulary ({ pods, namespaces | namespace, cidr, ports }), each rendering its CNI's kind and named after the workload. All join
the networkPolicy exclusion group, so composing two fails the render. The
cluster/namespace default-deny baseline is separate — the standalone
kurly.network.denyAll.{kubernetes,calico,cilium}(global=…) generators, placed
into a list with kurly.list, not composed onto a workload.kurly.security.restricted
(the default, written out), .baseline, and .privileged each set all
security knobs, so compose a profile before the single-knob hatches
(kurly.rootUser, kurly.writableRootFilesystem, kurly.hostUsers) that
fine-tune it. A relaxed knob omits its field rather than writing the default.kurly.recreate(). A rolling update would
deadlock on the volume, so a single-writer workload with a kurly.store should
use the Recreate strategy and one replica.kurly.labels adds to metadata and the
pod template only; the immutable matchLabels stay stable.Deployable workloads live under workloads/<name>/ as one function(params)
stage per file — a composable base with defaults and no exposure. Import a stage
by its canonical path, add your environment's + features, and render:
local kurly = import 'github.com/metio/kurly/main.libsonnet';
local tik = import 'github.com/metio/kurly/workloads/tik/backend.libsonnet';
kurly.list(
tik() // the workload's composable base
+ kurly.expose.gateway('tik.internal', 'shared') // route it at your host
+ kurly.store('/var/lib/tik', '5Gi') // any feature composes
)
kurly imports k8s-libsonnet, which is vendored on demand and gitignored:
jb install # vendor k8s-libsonnet
# resolve kurly's own canonical import path locally:
mkdir -p vendor/github.com/metio && ln -sfn ../../.. vendor/github.com/metio/kurly
jsonnet -J vendor your-workload.jsonnet # renders the kind: List
Author a workload as function(params) … so JaaS can feed parameters as TLAs;
plain jsonnet renders the defaults.
kurly ships its source (not rendered manifests) as single-layer OCI images.
A consumer pulls them as Flux OCIRepository sources, imports the workload by
canonical path in a JsonnetSnippet, composes their features, and renders with
kurly.list; stageset-controller applies the result. See
references/reference.md for the full manifest set, or
generate it from the Assembler.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub metio/kurly --plugin kurly