Skip to content

Install kslip

kslip installs with a Helm chart into a namespace of its own, on a cluster that runs kagent.

  • A Kubernetes cluster with support for selectable fields on custom resources, which are stable in Kubernetes 1.32. The kubeconfig needs permission to create namespaces, CustomResourceDefinitions, ClusterRoles and ClusterRoleBindings.
  • kagent on that cluster, serving the api.kagent.dev/v1alpha3 resources and the kagent.api.v1 Session API, with Agent Substrate as its runtime.
  • Docker, or another tool that builds OCI images.
  • Go, at the version named in go.mod.

Helm is installed into bin/ by the make targets that need it.

kslip creates every Session under one identity, and kagent lets only that identity send work to those Sessions. Choose how kslip identifies itself.

ServiceAccount authentication. kagent verifies Kubernetes ServiceAccount tokens issued for the kagent-invocation audience once an authority is configured. In the kagent chart values:

config:
server:
auth:
serviceAccount:
authority: kubernetes

The kslip chart mounts a token for that audience by default. kslip’s identity in kagent is then its ServiceAccount, kslip in the kslip-system namespace.

No authentication. A kagent installation in insecure mode accepts the identity a caller names. Set the kslip chart values kagent.auth.userID to the identity kslip uses, and kagent.auth.serviceAccountToken to false.

kagent deletes a Session that has been idle for longer than config.sessions.idleTtl, which defaults to seven days. A claim whose Session expires binds to another one, and the seat’s conversation starts empty.

Set the value to match how long a seat’s conversation has to survive without work. 0s turns expiration off, and Sessions then live until their claims are deleted:

config:
sessions:
idleTtl: 0s

Install the published OCI Helm chart from GitHub Container Registry:

Terminal window
helm upgrade --install kslip oci://ghcr.io/kslip-dev/charts/kslip \
--version 0.2.0 \
--namespace kslip-system --create-namespace

To verify the image and chart signatures before installing, see RELEASES.md. Each GitHub Release also attaches a rendered install.yaml manifest for clusters managed without Helm.

To build the controller image from source and push it to a registry the cluster pulls from:

Terminal window
make docker-build docker-push IMAGE_REPOSITORY=registry.example.com/kslip IMAGE_TAG=1.0.0

make docker-buildx builds and pushes the image for every platform in PLATFORMS, which defaults to linux/amd64,linux/arm64.

Then install the local chart:

Terminal window
make install IMAGE_REPOSITORY=registry.example.com/kslip IMAGE_TAG=1.0.0

This runs helm upgrade --install for a release named kslip in the kslip-system namespace, creating the namespace if it is missing. Set RELEASE and NAMESPACE to change either. The chart installs the kslip CustomResourceDefinitions with the release.

The chart reaches kagent at http://kagent-controller.kagent.svc.cluster.local:8083, the address of a kagent release named kagent in the kagent namespace. To use another address, or to pass other chart values, call Helm directly:

Terminal window
bin/helm upgrade --install kslip charts/kslip \
--namespace kslip-system --create-namespace \
--set image.repository=registry.example.com/kslip \
--set image.tag=1.0.0 \
--set kagent.apiURL=http://kagent-controller.agents.svc.cluster.local:8083

Use the full DNS name of the kagent controller Service. The chart README lists every value.

Helm installs CustomResourceDefinitions on the first install. When upgrading, apply the kslip schemas first. --force-conflicts transfers ownership of changed schema fields from the manager that installed them.

Terminal window
kubectl apply --server-side --force-conflicts -f config/crd/bases

make build-installer renders the same chart, with its CustomResourceDefinitions, into dist/install.yaml for clusters that are managed without Helm. Create the namespace before applying it.

The controller sends assignments under the same kagent identity it uses to create Sessions. It reads task state on a timer.

For a TLS-protected callback, enable callbacks and set controller.callback.url to the HTTPS origin of an internal Service, for example https://kslip-callback.kslip-system.svc.cluster.local:8443. Configure a TLS proxy in the controller Pod that serves that hostname, and point the Service at the proxy’s TLS port. The chart binds the HTTP callback receiver to 127.0.0.1:8080 and omits its HTTP callback Service when an HTTPS origin is set. The proxy must forward the original callback path and authorization header to the loopback listener. Install the proxy certificate’s issuing CA in kagent’s callback sender trust store. Configure controller.callback.jwksURL over HTTPS and its trusted issuer to validate the signed notice. Confirm that an unsigned request fails before dispatching work.

Set controller.callback.enabled to true to expose a ClusterIP Service and let kagent notify the controller. The Service uses an in-cluster HTTP URL. Enable delivery to that URL in the kagent chart values:

config:
push:
allowHttp: true
allowPrivateNetworks: true

To verify signed notifications, configure kagent’s controller.push.signing.secretName with a Secret containing an unencrypted PKCS#8 Ed25519 key in private-key.pem and set config.push.issuer to the signing issuer. Set controller.callback.jwksURL to kagent’s /.well-known/jwks.json endpoint. To check the token issuer, set controller.callback.issuer to the configured issuer with any trailing slash removed. An empty JWKS URL allows unsigned notifications. A notification prompts a task read when it reaches the active controller. Standby replicas return a retryable response. Polling covers missed notifications.

An operator registers an image by sha256 digest for each verifier name used by WorkflowRuns. Create cluster-scoped Verifier resources to register or update verifier images dynamically without restarting the controller (as in config/samples/verifier.yaml):

apiVersion: kslip.dev/v1alpha1
kind: Verifier
metadata:
name: go-pubsub
spec:
image: registry.example.com/team/go-pubsub-verifier@sha256:<digest>
allowedNamespaces: [team-a]
defaultTimeoutSeconds: 300

kslip looks up a Verifier resource matching the step’s verifier name first and falls back to the static Helm value controller.verifiers (or --verifiers JSON flag) when no matching Verifier exists:

controller:
verifiers:
go-pubsub: "registry.example.com/team/go-pubsub-verifier@sha256:<digest>"

The image entrypoint receives KSLIP_REPOSITORY, KSLIP_TARGET_BRANCH, KSLIP_BASE_COMMIT, KSLIP_CANDIDATE_BRANCH, and KSLIP_CANDIDATE_COMMIT. It verifies the checkout identity and runs the required suite. Exit zero means the required checks passed. Exit one means the candidate failed. Other exits and Jobs that cannot complete are infrastructure errors. For a rejection, write a short diagnostic to /dev/termination-log.

Verifier Jobs run in the WorkflowRun namespace as an unprivileged user without a ServiceAccount token or the controller’s Git credentials. Use the namespace’s workload and network controls for verifier Pods and limit Job creation and Job status writes to trusted identities. The verifier’s Git remote needs read access from that environment. The pub/sub example uses the same verifier contract.

Isolate verifier Pods and supply private candidates

Section titled “Isolate verifier Pods and supply private candidates”

Set controller.verifierRuntimeClassName to an installed RuntimeClass such as gvisor. Its scheduling rules apply to verifier Pods. The Pod label kslip.dev/component: verifier selects them for namespace NetworkPolicies. kagent manages the scheduling and sandbox policies for agent Sessions separately.

For private Git inputs, set the chart’s controller.verifierSource.url to an HTTPS origin, image to an operator-trusted fetcher image pinned by digest, and serviceAccount to a dedicated account that exists in each run namespace. The source service authenticates a projected, Pod-bound token with audience kslip-source and verifies the live Pod, owning Job, WorkflowRun and candidate before serving the content. Restrict Job, Pod, WorkflowRun, Verifier and ServiceAccount creation and modification to trusted identities.

In candidate Jobs the controller runs the image entrypoint with the argument fetch-source. The init container receives KSLIP_SOURCE_URL, KSLIP_RUN_UID, KSLIP_CANDIDATE_COMMIT and, when the step sets verify.params.specDigestSha256, KSLIP_PARAM_SPECDIGESTSHA256. It reads the projected token from /var/run/secrets/kslip-source/token. An optional caConfigMap supplies ca.crt at KSLIP_SOURCE_CA_FILE. The fetcher authenticates the source origin, downloads the pinned inputs to /kslip/input (a 512 MiB scratch volume), and validates their identities. The verifier receives that directory read-only. The token and CA mounts are exclusive to the init container. With an empty source configuration, verifier images acquire their own inputs. Probe Jobs omit source initialization.

The controller runs one Git merge or readback per repository at a time, with a shared limit of two active repositories. Change and WorkflowRun use the same limit. Git requests a blobless fetch for commit ancestry. Remotes without Git filtering send a full pack. The chart defaults to a 1Gi controller memory limit and a 2Gi disk-backed scratch volume. Set controller.resources and controller.gitScratchSizeLimit to fit the repositories it serves. The controller connects to the repository over HTTP or HTTPS. Use an HTTPS remote. For per-namespace isolation, create a Secret in the Change, WorkflowRun, or WorkflowBacklog namespace containing the complete HTTP Authorization header under authorization-header (or another key named in key) and reference it with gitCredentialsSecretRef. When gitCredentialsSecretRef is set, the controller strips process-wide GIT_CONFIG_* variables from that Git subprocess and sends only the referenced Secret’s header to that repository.

For cluster-wide defaults when gitCredentialsSecretRef is omitted, supply URL-scoped credentials through controller.env. Git accepts a URL-scoped authorization header from a Kubernetes Secret.

controller:
env:
- name: GIT_CONFIG_COUNT
value: "1"
- name: GIT_CONFIG_KEY_0
value: "http.https://git.example.com/team/checkout.git.extraHeader"
- name: GIT_CONFIG_VALUE_0
valueFrom:
secretKeyRef:
name: kslip-git
key: authorization-header

The Secret value holds the complete HTTP authorization header. Use credential-free repository URLs in Changes and WorkflowRun landing steps. The Change guide describes planner and builder setup. The WorkflowRun guide describes group configuration and landing.

Terminal window
kubectl --namespace kslip-system rollout status deployment/kslip-controller

The controller manager is ready when its readiness probe passes. With more than one replica, the replica holding the controller.kslip.dev Lease is the active one:

Terminal window
kubectl --namespace kslip-system get lease controller.kslip.dev

To check that kslip reaches kagent, create a claim for an Agent that exists and watch it bind:

Terminal window
kubectl --namespace team-a apply -f config/samples/agentclaim.yaml
kubectl --namespace team-a get agentclaims --watch

A claim that stays Pending reports the reason in its Bound condition. AgentClaim lists the reasons.

The controller manager serves Prometheus metrics over HTTPS on port 8443, exposed by the kslip-controller-metrics Service. It asks the Kubernetes API server to authenticate each caller and to authorize it for get on the /metrics path, so a scraper needs a ServiceAccount bound to the kslip-metrics-reader ClusterRole:

Terminal window
kubectl create clusterrolebinding prometheus-kslip-metrics \
--clusterrole=kslip-metrics-reader \
--serviceaccount=monitoring:prometheus

The endpoint presents a self-signed certificate unless the controller manager is given one with --metrics-cert-dir.

Build metric What it measures
kslip_build_info Constant gauge set to 1 with version, commit, and go_version labels.
Git metric What it measures
kslip_git_slot_attempts_total Attempts to acquire a Git slot, by operation and acquired or busy result. An operation can make several attempts across reconcile passes.
kslip_git_slot_hold_duration_seconds Distribution of seconds each acquired operation occupies a slot. The hold includes Kubernetes checks and Git work performed while the slot is held.

The operation labels are change_merge, change_readback, workflow_land and workflow_readback. Measure acquisition wait as elapsed time from work becoming eligible to acquiring the slot. The attempt counter and hold histogram show contention and occupancy.

Queue metric What it measures
kslip_seat_selection_candidates Bound seats supplied to each idle-seat selection.
kslip_seat_selection_assignment_lists Live Assignment list requests attempted by each selection.
kslip_seat_selection_duration_seconds Selection time including those list requests.
kslip_pathlease_group_size Live leases in each evaluated repository queue.
kslip_pathlease_pairs_compared Lease pairs compared in each completed queue evaluation.

Read queue sizes and comparisons alongside the PathLease reconcile duration and throughput. Use the seat selection time with the Assignment list count to distinguish selection cost from the time spent waiting for an agent.

Set controller.metrics.enabled=false to turn the endpoint off.

Delete every AgentClaim first, so that kslip deletes their Sessions while it is still running:

Terminal window
kubectl delete agentclaims --all --all-namespaces
make uninstall

Helm leaves the CustomResourceDefinitions in place. Remove them with:

Terminal window
kubectl delete -f config/crd/bases