Packages and CI/CD shared by the sarak.sh Karpenter providers
  • Go 99.5%
  • Nix 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-12-05 10:59:39 +00:00
.beads chore: start the kit module 2026-11-28 09:34:25 +00:00
.forgejo/workflows ci: pin checkout and changelog actions to commit SHAs 2026-11-28 20:43:58 +00:00
apis refactor: apis becomes nodeclass, with nodeclaimhash and resolved under it 2026-12-01 06:39:00 +00:00
app docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
bootstrap docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
catalogue docs(offering): the catalogue and Launcher apply the Unavailable marks 2026-12-01 11:35:31 +00:00
cloudapi refactor: operator becomes config; its HTTP client and Secret move to cloudapi 2026-12-01 07:04:34 +00:00
cloudprovider fix(metrics): an untried create observes no duration 2026-12-04 12:31:04 +00:00
config docs(config): re-wrap the Load doc 2026-12-04 16:38:34 +00:00
controllers refactor: apis becomes nodeclass, with nodeclaimhash and resolved under it 2026-12-01 06:39:00 +00:00
internal/example docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
metrics fix(metrics): RecordCreateUntried records an empty code as other 2026-12-04 12:31:33 +00:00
nodeclass docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
nodename docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
offering refactor: move offering, overhead and typename under catalogue 2026-12-01 06:35:06 +00:00
operator refactor: operator becomes config; its HTTP client and Secret move to cloudapi 2026-12-01 07:04:34 +00:00
overhead refactor: apis becomes nodeclass, with nodeclaimhash and resolved under it 2026-12-01 06:39:00 +00:00
ownership docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
providerid docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
reservedaddr docs: every package doc opens on the concept it owns 2026-12-01 11:34:40 +00:00
typename refactor: move offering, overhead and typename under catalogue 2026-12-01 06:35:06 +00:00
.gitattributes feat(bootstrap): render the k0s join user data and resolve Secret parts 2026-11-28 12:32:11 +00:00
.gitignore feat(bootstrap): render the k0s join user data and resolve Secret parts 2026-11-28 12:32:11 +00:00
.golangci.yaml chore: start the kit module 2026-11-28 09:34:25 +00:00
CHANGELOG.md release: 0.8.0 2026-12-05 10:59:39 +00:00
flake.lock chore: start the kit module 2026-11-28 09:34:25 +00:00
flake.nix feat(cloudprovider): shared cloud provider helpers and app.Run 2026-11-28 12:36:48 +00:00
GLOSSARY.md docs(glossary): a provider uses its cloud's word for its counterpart 2026-12-01 06:27:52 +00:00
go.mod feat(cloudprovider): shared cloud provider helpers and app.Run 2026-11-28 12:36:48 +00:00
go.sum feat(nodename): node name templates, holds and free-name choice 2026-11-28 10:42:50 +00:00
LICENSE chore: start the kit module 2026-11-28 09:34:25 +00:00
README.md feat: worked provider example; cloudprovider fixes for adoption and token cleanup 2026-11-28 13:24:17 +00:00
renovate.json chore: start the kit module 2026-11-28 09:34:25 +00:00
Taskfile.yaml refactor: apis becomes nodeclass, with nodeclaimhash and resolved under it 2026-12-01 06:39:00 +00:00

kit

Go packages shared by the sarak.sh Karpenter cloud providers: the parts of a provider that do not depend on the cloud it drives.

go get sarak.sh/karpenter/kit

internal/example is a worked example of a provider on kit, against an in-memory cloud: start there when writing a new provider, and replace fakecloud.go with your cloud's API client.

CI/CD

Providers run kit's reusable Forgejo workflows and carry no pipeline of their own: each workflow file in a provider is a call with inputs. Every job runs on the nixos runner with tools from the caller's flake.

Workflow Runs
.forgejo/workflows/go-ci.yaml nix flake check, nix build of the build installables, the verify tasks (any check beyond the flake's: stale generated files, chart renders, envtest), changelog validation on pull requests
.forgejo/workflows/go-security.yaml the command input in the dev shell, govulncheck ./... by default
.forgejo/workflows/go-release.yaml the changelog-driven release commit, the checks on it, the per-arch image and its index, the chart, then the release and its tag

Each input is documented in the workflow's workflow_call block. A provider calls them like this:

# .forgejo/workflows/ci.yaml
on:
  pull_request:
jobs:
  ci:
    uses: karpenter/kit/.forgejo/workflows/go-ci.yaml@main
    with:
      build: .#default .#image-amd64 .#image-arm64
      verify: generate-verify chart-crds-verify
# .forgejo/workflows/release.yaml
on:
  workflow_dispatch:
    inputs:
      prerelease: { type: boolean, default: false }
      version: { type: string, default: "" }
concurrency:
  group: release
  cancel-in-progress: false
jobs:
  release:
    uses: https://sarak.sh/karpenter/kit/.forgejo/workflows/go-release.yaml@<sha>
    runs-on: nixos
    enable-openid-connect: true
    with:
      prerelease: ${{ inputs.prerelease }}
      version: ${{ inputs.version }}
      build: .#default .#image-amd64 .#image-arm64
      verify: generate-verify chart-crds-verify
      image: sarak.sh/karpenter/provider-vultr
      chart-dir: charts/karpenter-provider-vultr
      registry-audience: ${{ vars.REGISTRY_AUDIENCE }}

What the workflows need from the caller's flake:

  • a dev shell carrying jq and curl, plus govulncheck for the default scan, crane for an image and helm for a chart
  • .#image-<arch> for each of image-arches, a script that streams the image tarball, as dockerTools.streamLayeredImage builds
  • a VERSION file the flake reads, unless the call sets version-file: false

Development

The flake's dev shell carries the toolchain; task lists the commands.

nix develop
task test
task lint
task check   # tests and lint in the nix sandbox, as CI runs them