agentsclimarketplace

Kurly

Skill metio/kurly/skills/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.From its SKILL.md

Install
npx -y skills add metio/kurly --skill kurly

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.8 KB, as published. Nobody here has run it

Composing workloads with kurly

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 docs are the source of truth

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:

  • Reference — every kind, feature, exposure recipe, network policy variant, and security profile with its parameters.
  • /catalog.json — the same data, machine-readable (schemaVersion, kinds, features, expose, network, security, workloads). Fetch and parse this when you need the precise API.
  • Assembler — compose a workload in the browser and copy out the snippet + JaaS manifests.

Base kinds

  • 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).

Composition rules to honor

  • A feature contributes only to config. Never patch a manifest field from a feature — a later feature that recomputes that manifest from config would clobber it.
  • One exposure per workload. Every 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.
  • One network policy variant per workload. 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.
  • Security profiles set every knob, last one wins. 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.
  • A ReadWriteOnce store needs 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.
  • User labels never reach a selector. kurly.labels adds to metadata and the pod template only; the immutable matchLabels stay stable.

Starting from a published workload

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
)

Rendering locally

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.

Deploying through JaaS + stageset

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.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.