• v0.1.0 e2968dab4f

    v0.1.0 Stable

    mikluko released this 2026-11-28 20:32:40 +00:00 | 44 commits to main since this release

    Added

    • Package apis with the bootstrap, user data, secret reference and kubelet reservation types shared by the node class CRDs, and helpers that read resolved entries against a condition's observed generation. A secret reference's namespace, name and key must each be non-empty.
    • The bootstrap/token package mints k0s worker join tokens from a bootstrap token Secret or a k0smotron JoinTokenRequest. Releasing a NodeClaim's bootstrap token deletes its Secrets in kube-system through an uncached reader given with WithSecretReader, so a provider needs list and delete on Secrets there.
    • The bootstrap package renders the cloud-init multipart user data of a k0s worker join: a boothook that writes the join token, node name and register taints to join.env once, the node class's beforeJoin, join and afterJoin parts, a generated join for k0sVersion unless join replaces it, and the provider's own parts. The provider sets the join.env path, the metadata URLs of the instance ID and, optionally, the zone (IPv6 hosts included), the provider ID scheme and the most bytes the cloud stores.
    • The generated join retries the metadata service, fails before installing k0s when it returns an empty or blank instance ID or zone or the k0s install script cannot be fetched, and registers the node as <scheme>://<instance ID>, or <scheme>://<zone>/<instance ID> when a zone URL is set.
    • Renderer.UserData refuses a join.env value holding a line break, a node name that is not a DNS-1123 subdomain, and a document above the size limit; NewRenderer refuses a provider part whose filename or content type is malformed.
    • bootstrap.ResolveParts reads a node class's Secret parts live through the reader it is given, and bootstrap.Referencing finds the node classes whose parts read a given Secret, for a metadata-only Secret watch.
    • bootstrap.Joiner resolves the parts, mints a join token and renders the user data, releasing the token when the document is refused.
    • Package catalogue: an instance type cache over a provider's Source, read whole or zone by zone, refreshed after a TTL by one fetch at a time, serving the last good result of a failing fetch or zone until a retry interval passes, and listing per node class with its zones, capacity, overhead and the offerings marked unavailable; each listed type's zone and capacity type requirements hold the values of its listed offerings only.
    • The cloudprovider package gives a provider's CloudProvider the shared repair policies, a node class lookup that reports a missing node class as NodeClassNotReady, CreateError mapping a failed create onto Karpenter's error types and a Launched reason (nodename errors included), Launch, configured by a Launcher, that tries ranked offerings in order, marks refused ones unavailable, runs the cleanup of each attempt that created no instance, and turns a panic in an attempt into its error, ErrNoInstance on every error that says no instance was created, Hydrate for the labels and capacity of a launched NodeClaim, HydrateAt for those of an instance found running at a Placement, its type in the catalogue or not, FirstDrift for an ordered drift table, and CleanupContext for undoing a failed create.
    • The app package runs a provider's controller: Run builds Karpenter's operator, wires the provider's CloudProvider into the core controllers, adds the provider's own controllers, stops on SIGTERM or SIGINT, and returns every failure as an error.
    • The controllers/nodeclaimhash package stamps NodeClaims with their node class hash and hash version, and its HashSpec hashes a node class spec.
    • The controllers/orphan package deletes the cluster's instances whose NodeClaim is gone or holds another instance. It refuses a sweep when no instance belongs to an existing NodeClaim, and per sweep deletes at most half of the cluster's instances old enough to judge, rounded down but at least one, oldest first.
    • The controllers/jointoken package releases a NodeClaim's join token once it registers or is deleted.
    • internal/example is a worked example of a provider built on kit, against an in-memory cloud.
    • cloudprovider.NodeClass refuses a reference to another group or kind with ErrForeignNodeClass, so a provider's GetInstanceTypes can answer another provider's node pool with no instance types and no error.
    • cloudprovider.Launcher records each launch try as a create in its Metrics: result, duration and, for a failure, the code refused, no_instance or other.
    • metrics.WithHelp sets the HELP text of one series, keyed by a metrics.Series constant, so a provider keeps its existing help texts.
    • Package metrics registers and records the series every provider emits (create, delete, drift, instance type cache and price, image resolution errors, orphan deletions and refused sweeps) under karpenter_<provider>_, with the created resource's noun configurable.
    • The nodename package renders node name templates against a node class, a NodeClaim and the provider's own fields, where a label a template reads and the object lacks is an error. It picks a random rendered name that no Node, no provider instance and no launch in flight holds, and refuses a name released since the launch began listing. nodename.Validate fails what fails every launch, and checks the DNS label shape only of a template that cannot vary per launch, so a pass says nothing about the names real launches get.
    • The apis.NodeNames type carries the nodeNameTemplates field for a provider to embed inline in its node class spec.
    • The offering package: a TTL cache of offerings a cloud refused, keyed by instance type, zone and capacity type, and a deterministic cheapest-first ranking of launchable offerings.
    • Package operator loads the environment settings every provider shares, with CLUSTER_NAME required to be a valid Kubernetes label value, builds the API HTTP client with fixed transport limits, redacts secrets, and refuses to start against the wrong cluster.
    • Package overhead: the kube-reserved, system-reserved and eviction overhead of an instance type from a node class's KubeletConfiguration, with the kubelet's defaults and percentage arithmetic, and the allocatable that leaves, never below zero. For caps the overhead per resource at the capacity, filling kube-reserved, then system-reserved, then the eviction threshold, so Karpenter's own allocatable matches Allocatable; a resource absent from the capacity has no overhead entry.
    • The ownership package marks and recognises a cluster's instances by the karpenter.sh/* keys, as labels or as key=value tags.
    • The providerid package formats and parses <scheme>://<id> provider IDs.
    • Package typename: instance type names as <provider>-<native name> (vultr-voc-c-4c-8gb-75s-amd), so a NodeClaim's type shows which cloud it comes from, and the reverse for API calls.
    • Reusable Forgejo workflows for the providers: go-ci.yaml (flake checks, builds, stale-generation checks, changelog validation), go-security.yaml (govulncheck) and go-release.yaml (changelog-driven release commit, per-arch image and index, chart, then release and tag), each configured by its inputs. go-release.yaml is called by its https:// URL from a job with runs-on and enable-openid-connect, which is the form that gives its jobs an OIDC token for the registry.
    Downloads