Kubernetes with Helm
This page is for the operator who runs kōjō on a Kubernetes cluster with the chart. The sandboxes it starts are described on the k8s driver page; what applies to every install (high availability, upgrades, secrets, sizing and the images) is on Deploy.
The chart is charts/kojo. Chart versions follow kōjō’s releases: the chart for vX.Y.Z has version and appVersion X.Y.Z and runs ghcr.io/xavidop/kojo:X.Y.Z by default. It needs Kubernetes 1.25 or later.
helm install kojo oci://ghcr.io/xavidop/charts/kojo --version "$KOJO_VERSION" -n kojo --create-namespace
helm repo add kojo https://xavidop.github.io/kojo
helm repo update
helm install kojo kojo/kojo -n kojo --create-namespace
Both carry the same chart. KOJO_VERSION is a released version without the v.
What the chart installs
| Object | What it is |
|---|---|
Deployment <fullname> |
kojo serve: dashboard, API, webhooks, MCP, session workers and the scheduler. 2 replicas by default. |
Deployment <fullname>-proxy |
kojo proxy: the egress proxy of the sandboxes. 2 replicas by default, each holding every sandbox’s policy. |
Services <fullname>-proxy, <fullname>-proxy-admin |
The proxy port for sandboxes; the admin port of each replica, headless, for kōjō. |
ConfigMap <fullname>-config |
The rendered kojo.yaml, mounted at /etc/kojo/kojo.yaml in both. A change to it rolls both. |
Secrets <fullname>-generated, <fullname>-proxy-ca |
Values the chart generates once: session secret, bootstrap token, proxy admin token, the proxy’s CA. |
| Role, RoleBinding, ClusterRole | The permissions of the k8s driver. |
NetworkPolicy <fullname>-sandbox-egress |
Locks sandbox pods down to the proxy. |
StatefulSet <fullname>-postgresql |
Optional bundled Postgres with pgvector, on by default. |
| PodDisruptionBudget, Service, ServiceAccount | For the kōjō pods; a second PodDisruptionBudget for the proxy pods. |
| Ingress, HTTPRoute, ServiceMonitor | Optional. |
| Agent Sandbox CRDs and controller | Optional (agentSandbox.install). |
The cluster needs three things the chart does not install by default: Kubernetes Agent Sandbox v1.0.12, a RuntimeClass that isolates, and a CNI that enforces NetworkPolicy.
kojo.yaml
The chart builds kojo.yaml from three layers, the later ones winning:
- The chart’s defaults:
server.public_url(the first Ingress host, else the first HTTPRoute hostname, else the Service’s in-cluster address), the generated session secret, the bootstrap token, thefastandstrongtiers on Anthropic, and budgets of 10 USD per session and 200 USD per day. The default tiers carry no price, sokojo doctorwarns that their calls are not capped until you set one. config: your part of the file, as a map.- The keys the chart owns. The chart fails when
configsets one of them.
Key of kojo.yaml |
Set it with |
|---|---|
server.listen |
always :8080 |
database.url |
database.* or postgresql.* |
sandbox.driver |
sandbox.driver |
sandbox.k8s.namespace |
sandbox.namespace |
sandbox.k8s.runtime_class |
sandbox.runtimeClassName |
sandbox.k8s.proxy_image |
image.*. Informational: the chart sets it and the binary does not read it. |
sandbox.proxy.* |
proxy.* (private_hosts is proxy.privateHosts, allow_private is proxy.allowPrivate, max_conns_per_sandbox is proxy.maxConnsPerSandbox, idle_timeout is proxy.idleTimeout, upstream_ca_file is proxy.upstreamCA) |
config:
server:
public_url: https://kojo.example.com
auth:
oidc:
issuer: https://accounts.google.com
client_id: ${OIDC_CLIENT_ID}
client_secret: ${OIDC_CLIENT_SECRET}
admins: [you@example.com]
forges:
github:
app_id: ${GITHUB_APP_ID}
private_key_file: /secrets/github-app.pem
webhook_secret: ${GITHUB_WEBHOOK_SECRET}
models:
budgets:
per_session_usd: 10
per_day_usd: 200
The chart never runs config through Helm’s tpl, so ${NAME} references reach kōjō untouched. existingConfigMap names a ConfigMap you manage with the whole file under the key kojo.yaml; the chart then ignores config and checks nothing.
Main values
The chart’s README lists every value. These are the ones most installs touch:
| Value | Default | Meaning |
|---|---|---|
image.repository, image.tag, image.digest |
ghcr.io/xavidop/kojo, appVersion, none |
Image of the kōjō and kojo-proxy pods. A digest wins over the tag. |
replicaCount |
2 |
kōjō replicas. |
config |
{} |
Your part of kojo.yaml. |
existingConfigMap |
"" |
A ConfigMap with the whole file. Replaces config. |
secrets.existingSecret |
"" |
A Secret whose keys become environment variables. |
secrets.create |
{} |
NAME: value pairs stored in <fullname>-secrets. The values end up in Helm’s release history. |
auth.sessionSecret.generate |
true |
Generate and keep the session cookie key. |
auth.bootstrapToken.enabled |
true |
Add an admin API token while config has no sign-in method. |
postgresql.enabled |
true |
Run the bundled Postgres: one replica, an 8Gi volume, no replication, no backups. |
database.externalUrl, database.existingSecret |
"" |
An external Postgres. Needs postgresql.enabled=false. |
sandbox.driver |
k8s |
k8s; e2b for sandboxes at an E2B-compatible service outside the cluster (see e2b driver); or fake with config.dev: true for tests of the chart. |
sandbox.namespace |
<release namespace>-sandboxes, created by the chart |
Where sandboxes run. A namespace named here must exist, and cannot be the release namespace. See The sandbox namespace. |
sandbox.runtimeClassName |
kata |
RuntimeClass of the sandbox pods. |
sandbox.podSecurity |
privileged for a kata* RuntimeClass, else baseline |
Pod Security level of the namespace the chart creates. |
sandbox.limitRange.enabled |
true |
Default requests (250m, 512Mi) and limits (2 CPUs, 4Gi) for a sandbox container that names none. |
sandbox.admissionPolicy.enabled |
true |
The ValidatingAdmissionPolicy on the sandbox namespace (Kubernetes 1.30 and later). |
proxy.enabled |
true |
Deploy kojo-proxy. Required by the k8s driver. |
proxy.replicaCount |
2 |
kojo-proxy replicas. Each holds every sandbox’s policy. |
proxy.syncTimeout |
30s |
How long a new proxy replica waits for kōjō to send it the policies before it reports ready anyway. |
proxy.pdb.enabled, proxy.pdb.minAvailable |
true, 1 |
PodDisruptionBudget of the proxy pods. |
proxy.podAntiAffinity, proxy.topologySpreadConstraints |
soft, [] |
Spread the proxy pods over nodes (proxy.affinity replaces the preset). |
proxy.ca.existingSecret |
"" |
A kubernetes.io/tls Secret with an ECDSA CA. Empty generates one. |
proxy.privateHosts |
[] |
Hosts that may resolve to private addresses: a forge on a private network. |
proxy.allowPrivate |
false |
Let sandboxes reach every allowlisted host on private addresses. Prefer proxy.privateHosts. |
proxy.maxConnsPerSandbox |
64 |
The most one sandbox may have open through a proxy replica at once; one more gets HTTP 429. |
proxy.idleTimeout |
5m |
How long a tunnel may carry nothing either way before the proxy closes it (at least 1s). |
proxy.upstreamCA.existingSecret |
"" |
A Secret with extra root certificates the proxy trusts (key ca.crt): a forge with a private CA. |
agentSandbox.install |
false |
Install Agent Sandbox v1.0.12 with the release. |
rbac.create, rbac.clusterRole |
true, true |
The driver’s Role, and the ClusterRole that reads RuntimeClasses. |
networkPolicy.sandboxEgress.enabled |
true |
The lock-down of the sandbox pods. |
networkPolicy.cilium.enabled |
false |
Also create the equivalent CiliumNetworkPolicy. |
networkPolicy.enabled |
false |
NetworkPolicies for the kōjō, kojo-proxy and Postgres pods. |
ingress.enabled, gatewayAPI.enabled |
false |
Create an Ingress or an HTTPRoute. |
serviceMonitor.enabled |
false |
Create a Prometheus Operator ServiceMonitor. |
pdb.enabled, pdb.minAvailable |
true, 1 |
PodDisruptionBudget of the kōjō pods. |
terminationGracePeriodSeconds |
60 |
Time a pod gets to stop. |
extraVolumes, extraVolumeMounts |
[] |
For files such as the GitHub App’s key. |
values.schema.json validates every value and rejects unknown keys, so a typo fails the install. config is the exception: kōjō validates it at startup. The chart also fails on values that contradict each other and says which: the bundled Postgres together with an external database, no database at all, more than one replica without a session secret, the k8s driver without the proxy, sandboxes in the release namespace, and a config that sets a key the chart owns.
The proxy deployment
kojo-proxy is the only way out of a sandbox. For each sandbox, kōjō pushes the session’s allowlist and credentials to the proxy’s admin API. The proxy refuses every host that is not on the allowlist and sets the real credential on requests to allowed hosts, terminating TLS for them with its own CA, which the sandbox trusts.
- The Service
<fullname>-proxyhas the proxy port,3128, which sandboxes use. The headless Service<fullname>-proxy-adminhas the admin API,3129, one address per replica, ready or not: kōjō resolves it every 5 seconds (admin_discovery: dns) and drives each replica on its own. The admin API takes a bearer token;/healthzand/readyzon it are open for the probes. proxy.replicaCount(default 2) replicas each hold every sandbox’s policy, so a sandbox’s request may land on any of them. kōjō sends every policy and every delete to each replica, and sends a replica what it missed, after a restart or an outage, within seconds. A replica’s readiness probe is/readyz: a new or restarted replica takes no sandbox traffic until a kōjō server has sent it the policies, or untilproxy.syncTimeout(default 30s) has passed with no kōjō server to do it. See Several replicas.- A PodDisruptionBudget (
proxy.pdb,minAvailable: 1) keeps a replica up through node drains, andproxy.podAntiAffinity: softputs replicas on different nodes when it can;hardrequires it, andproxy.topologySpreadConstraintsspreads them over zones. - Every replica mounts the CA from the one Secret,
<fullname>-proxy-caorproxy.ca.existingSecret: a sandbox trusts one CA, whichever replica it reaches. Only the proxy pods mount the CA’s private key. A render without access to the cluster (helm template, Argo CD) cannot find the generated Secret and makes a new CA each time, and replicas started on either side of such a change disagree; useproxy.ca.existingSecretthere. - The proxy refuses private, loopback and link-local destinations, allowlisted or not, so a sandbox cannot use it to reach the cluster’s or the cloud’s internal services. Name a forge on a private network in
proxy.privateHosts(for example[gitlab.corp.internal]): those hosts may resolve to private addresses, every other host still may not. Addproxy.upstreamCA.existingSecretwhen its certificate comes from a private CA.proxy.allowPrivate: trueopens private addresses to every allowlisted host. - The proxy pods run the same image with a
kojo.yamlof their own,<fullname>-proxy-config: thesandbox.proxysection and nothing else, made from theproxy.*values. Their environment isKOJO_PROXY_ADMIN_TOKENandproxy.extraEnv, so they hold none of kōjō’s credentials (the database URL, the session secret, the bootstrap token,secrets.*). They never call the Kubernetes API and mount no ServiceAccount token.
What the proxy enforces is on kojo-proxy. To run it apart from the chart, see Running kojo proxy separately.
RBAC for the k8s driver
rbac.create binds the kōjō ServiceAccount to a Role in the sandbox namespace, and nowhere else. It grants what the k8s driver calls and nothing more:
| API group | Resources | Verbs |
|---|---|---|
agents.x-k8s.io |
sandboxes |
get |
extensions.agents.x-k8s.io |
sandboxtemplates, sandboxwarmpools |
get, list, create, update, patch, delete |
extensions.agents.x-k8s.io |
sandboxclaims |
get, list, create, patch, delete |
| core | pods |
get, list |
| core | pods/exec |
get, create |
| core | configmaps |
get, create, update |
networking.k8s.io |
networkpolicies |
list |
cilium.io |
ciliumnetworkpolicies |
list |
kōjō creates the Agent Sandbox objects at runtime: a SandboxTemplate per skill and kit, a SandboxWarmPool per template and a SandboxClaim per session. The Agent Sandbox controller makes the Sandbox, its pod and its workspace volume. kōjō runs commands in a sandbox through pods/exec, and writes the ConfigMap kojo-proxy-ca that sandboxes mount. It lists the egress policies to report whether egress is enforced.
rbac.clusterRole adds a ClusterRole that reads RuntimeClasses, which are cluster-scoped, so kojo doctor can check sandbox.runtimeClassName. Turn it off if you may not create cluster-scoped objects; the check is then skipped.
The sandbox namespace
Sandboxes run in a namespace of their own, because of what kōjō may do there: run commands in any pod and write ConfigMaps. In the release namespace that would reach kōjō’s own pods, kojo-proxy’s and Postgres’s, so the chart refuses sandbox.namespace set to the release namespace.
- The namespace. With
sandbox.namespaceempty, the chart creates<release namespace>-sandboxes, andhelm uninstalldeletes it with every sandbox in it. A namespace you name insandbox.namespacemust exist; the chart puts its Role, RoleBinding, LimitRange and egress policies there, and leaves the namespace’s labels to you. NOTES warns when it has nopod-security.kubernetes.io/enforcelabel. - Pod Security. The namespace the chart creates enforces the level
sandbox.podSecuritynames. By default that isbaselinewith gVisor: sandbox containers run without capabilities, privilege escalation or host namespaces. On Kata (a RuntimeClass whose name starts withkata) it isprivileged, because a kit that needs Docker runs a privileged container inside the pod’s own VM, whichbaselinerefuses; the admission policy below keeps the rest ofbaselinethere.restrictedis out of reach: it needsrunAsNonRoot, and the workspace’s init container runs as root (it opens the fresh volume to the image’s user), as do most kit images. - Defaults for containers.
sandbox.limitRangegives a sandbox container that names no requests or limits 250m CPU and 512Mi of memory requested and 2 CPUs and 4Gi as its limit. That is the workspace’s init container and the container of a kit withoutresources; the built-in kits all name CPU and memory, whichconfig.sandbox.max_resourcescaps. It sets no maximum, which would refuse a kit’s pod outright. - The admission policy.
sandbox.admissionPolicyadds a ValidatingAdmissionPolicy and its binding for the sandbox namespace. It refuses pods, SandboxTemplates and Sandboxes there that use the node’s network, process or IPC namespace, mount a hostPath, run a privileged container (allowed when the level isprivileged, for Kata), use a RuntimeClass other thansandbox.runtimeClassNameor a ServiceAccount other thandefault, or mount a ServiceAccount token. Pod Security looks at pods only; the policy also covers the templates kōjō writes, so a kōjō that is compromised cannot use its Role to start a pod on the node. It is rendered when the cluster serves ValidatingAdmissionPolicy (Kubernetes 1.30 and later); withhelm template, pass--api-versions admissionregistration.k8s.io/v1/ValidatingAdmissionPolicy. Without it, NOTES says the namespace has none.
Upgrading from a chart that ran sandboxes in the release namespace
Before this, an empty sandbox.namespace meant the release namespace. An upgrade moves the sandboxes to <release namespace>-sandboxes and removes kōjō’s Role from the release namespace, so:
- Upgrade when no session is running: a session that is running loses its sandbox and fails.
- If you had set
sandbox.namespaceto the release namespace, unset it or name another namespace; the chart now refuses it. - The old namespace keeps the claims, warm pools, templates, warm pool pods and the
kojo-proxy-caConfigMap kōjō made there, which it no longer manages. The chart keeps the sandbox egress policy in the release namespace so those pods stay locked down, and NOTES lists them after the upgrade. Delete them:
kubectl -n kojo delete sandboxclaims,sandboxwarmpools,sandboxtemplates,configmaps -l app.kubernetes.io/managed-by=kojo
Network policies
The sandbox egress policy (networkPolicy.sandboxEgress.enabled, on by default) selects the pods labelled kojo.dev/sandbox: "true" and allows them:
- no ingress at all; kōjō reaches a sandbox through the Kubernetes API, not over the pod network;
- egress to the kojo-proxy pods on port 3128;
- no DNS: the k8s driver gives sandboxes the proxy’s address, not its name.
Everything else is dropped: DNS, the internet, the Kubernetes API, other pods, other sandboxes and the proxy’s admin port.
DNS stays closed because it is a way out of a sandbox: the cluster’s resolver forwards any name it is asked for, so code in a sandbox that looks up <data>.<a domain its author owns> sends the data to that domain’s name servers, and reads answers back. networkPolicy.sandboxEgress.dns.enabled opens it, to the peers in networkPolicy.sandboxEgress.dns.peers (by default the kube-dns pods in kube-system). Turn it on only when kōjō cannot resolve the proxy’s name itself, which is when it runs outside the cluster: the sandboxes then get the name.
networkPolicy.cilium.enabled adds the same rules as a CiliumNetworkPolicy, for clusters where Cilium is the CNI. With DNS on, DNS then goes through Cilium’s DNS proxy and is allowed by the CiliumNetworkPolicy only, and networkPolicy.cilium.dnsPatterns (default ["*"]) narrows the names a sandbox may resolve. In a pattern * stands for one label, and Cilium refuses a name no pattern matches, which ends the resolver’s walk through its search list: ["*.svc.cluster.local"] does not match kojo-proxy.kojo.svc.cluster.local, and the patterns have to match the search-list names the resolver tries before the proxy’s.
Both policies carry the label app.kubernetes.io/component: sandbox-egress. The k8s driver looks for it and reports egress as enforced only when it finds one in the sandbox namespace. The chart also renders them in the release namespace, for sandbox pods an upgrade left there. A policy needs a CNI that enforces it: kojo doctor starts a test sandbox and tries a blocked connection to make sure.
networkPolicy.enabled is separate. It adds policies for the pods the chart runs: kōjō’s HTTP port from networkPolicy.ingressFrom, its metrics port from networkPolicy.metricsFrom only (for example, your Prometheus’s namespace; empty, no pod reaches it, since metrics take no credentials), the proxy’s port 3128 from sandboxes only and its admin port from kōjō only, and Postgres from kōjō only. It is off by default, because an ingress controller’s namespace has to be named in networkPolicy.ingressFrom first; until it is on, kojo doctor warns that any pod can reach Postgres, the proxy’s admin port and the metrics port (the chart sets server.network_policy in kojo.yaml).
Runtime class
sandbox.runtimeClassName names the RuntimeClass of the sandbox pods. The chart installs no runtime: the RuntimeClass must exist on the cluster.
| RuntimeClass | Isolation | Notes |
|---|---|---|
kata (default) |
a small VM per sandbox, with its own kernel | Nodes need hardware virtualization. It is what a session needs to run its own Docker daemon. |
gvisor |
a user-space kernel | For nodes that cannot run VMs. A session cannot run Docker inside it. |
For gVisor, install runsc on the nodes, create the RuntimeClass and select it:
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: gvisor
handler: runsc
helm upgrade kojo oci://ghcr.io/xavidop/charts/kojo -n kojo --reuse-values \
--set sandbox.runtimeClassName=gvisor
The driver maps a RuntimeClass to an isolation level by its handler: kata* is a microVM, runsc is gVisor, anything else is a plain container. kojo doctor refuses a RuntimeClass that does not isolate outside development mode.
A skill’s needs_docker is honoured where the driver can; otherwise the skill runs without Docker and is told so. On Kata it runs in a privileged container, so the nodes’ containerd or CRI-O must set privileged_without_host_devices = true for the Kata handler, or Kata passes every device of the node into the VM. kata-deploy sets it; see the k8s driver.
Sandbox sizes
Each sandbox pod requests, and is limited to, the CPU and memory of its skill’s kit; the built-in kits ask for up to 8 CPUs and 16Gi. On nodes smaller than that, or busy with other work, cap every kit with sandbox.max_resources under config:
config:
sandbox:
max_resources:
cpu: "2"
memory: 4Gi
disk: 20Gi
k8s:
unschedulable_timeout: 3m
A kit that asks for more gets the cap; one that asks for less keeps its own. When no node has room for a sandbox pod, creating the sandbox fails after sandbox.k8s.unschedulable_timeout (default 2 minutes) with the scheduler’s reason, instead of waiting out the 5 minutes a sandbox has to start; raise it when your cluster autoscaler takes longer to add a node. See Scheduling. Neither key is owned by the chart.
Agent Sandbox
The chart is tested with Agent Sandbox v1.0.12 and vendors that release’s manifest.
-
agentSandbox.install: false(default): the cluster has Agent Sandbox already, or you install it:kubectl apply --server-side -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/v1.0.12/sandbox-with-extensions.yaml -
agentSandbox.install: true: the release renders the vendored manifest as it is: the namespaceagent-sandbox-system, the controller and four CRDs. Use it where one kōjō release owns Agent Sandbox; a second release that installs it conflicts with the first.
With agentSandbox.keepCRDs: true (default) helm uninstall leaves the CRDs. agentSandbox.version states the release and is not a switch: another value fails the render.
Secrets
Secret values do not go in config. config names a variable and the chart puts the value in the environment.
secrets.existingSecretnames a Secret you manage. Each of its keys becomes an environment variable. Use this in production.secrets.createstoresNAME: valuepairs in a Secret the chart owns. The values end up in Helm’s release history.
The chart generates these once and keeps them on later upgrades by reading them back from the cluster:
| Secret | Key | What it is | Turn it off with |
|---|---|---|---|
<fullname>-generated |
KOJO_SESSION_SECRET |
signs the dashboard’s session cookie | auth.sessionSecret.generate=false |
<fullname>-generated |
KOJO_BOOTSTRAP_TOKEN |
an admin API token, used while config has no sign-in method |
auth.bootstrapToken.enabled=false |
<fullname>-generated |
KOJO_PROXY_ADMIN_TOKEN |
bearer token of the proxy’s admin API | proxy.adminToken.existingSecret |
<fullname>-proxy-ca |
tls.crt, tls.key |
the proxy’s CA (ECDSA P-256, ten years) | proxy.ca.existingSecret |
<fullname>-postgresql |
password |
password of the bundled Postgres | postgresql.auth.existingSecret |
Reading them back needs a cluster. helm template and tools that render without one, Argo CD for example, would make new values on every render: a new CA that no running sandbox trusts, a new session key that signs everyone out. With those tools turn every generator off and bring your own Secrets; charts/kojo/ci/render/bring-your-own-values.yaml is a complete example.
To rotate a generated value, delete its key from the Secret and run helm upgrade. Sandboxes started before a CA rotation stop trusting the proxy; let them finish first.
Model provider credentials
Keys of the model providers go in the Secret like the others (ANTHROPIC_API_KEY, AZURE_OPENAI_API_KEY, …). Vertex AI, Bedrock, and Azure without a key take the cloud’s workload identity instead, through the kōjō pods’ ServiceAccount (serviceAccount.annotations) and labels (podLabels). See Models for each provider’s settings and the roles its identity needs.
| Provider | Values |
|---|---|
vertexai on GKE |
serviceAccount.annotations: {iam.gke.io/gcp-service-account: kojo@PROJECT.iam.gserviceaccount.com} to act as an IAM service account; nothing when the Kubernetes service account is granted the role itself |
bedrock on EKS with IAM roles for service accounts |
serviceAccount.annotations: {eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT:role/kojo-bedrock} |
bedrock on EKS with Pod Identity |
nothing: the association names the namespace and the ServiceAccount |
azure on AKS with Microsoft Entra Workload ID |
serviceAccount.annotations: {azure.workload.identity/client-id: CLIENT_ID} and podLabels: {azure.workload.identity/use: "true"} |
The ServiceAccount’s name is the release’s full name unless serviceAccount.name sets it; the identity’s trust (the workload identity binding, the IAM role’s trust policy, the federated credential) names it. networkPolicy.egress, when set, must also let the kōjō pods reach the provider and its token service.
Mount the GitHub App’s private key as a file:
extraVolumes:
- name: github-app
secret:
secretName: kojo-github-app
extraVolumeMounts:
- name: github-app
mountPath: /secrets
readOnly: true
Database
-
postgresql.enabled: true(default) runs one Postgres replica with pgvector as a StatefulSet with an 8Gi volume. It has no replication and no backups. Its password Secret and its volume survivehelm uninstall. -
For production, point the chart at a Postgres you run:
kubectl -n kojo create secret generic kojo-database \ --from-literal=DATABASE_URL='postgres://kojo:...@db.internal:5432/kojo?sslmode=require' helm upgrade kojo oci://ghcr.io/xavidop/charts/kojo -n kojo --reuse-values \ --set postgresql.enabled=false --set database.existingSecret=kojo-database
There is no migrations Job. kojo serve applies pending migrations when it starts, and replicas that start together take turns on a Postgres advisory lock. With the bundled Postgres an init container waits for the database first. The startup probe allows two minutes for the migrations of a first start, and /readyz answers 200 once Postgres is reachable.
Traffic and metrics
- The Service
<fullname>exposes port 8080: the dashboard, the API, the webhooks, MCP,/healthzand/readyz. - The ClusterIP Service
<fullname>-metricsexposes port 9090, with/metricsonly. Exposing the HTTP Service, through a LoadBalancer or an Ingress, never publishes the metrics. ingressandgatewayAPIroute to it. The dashboard polls and needs no special timeout. The MCP endpoint at/mcpmay answer with a stream, so if MCP clients come through the ingress, raise the read timeout of your ingress controller, or setgatewayAPI.timeouts, for example{request: "0s"}.serviceMonitor.enabledcreates a ServiceMonitor that scrapes/metricson the metrics port every 30 seconds with a 10 second timeout (serviceMonitor.interval,serviceMonitor.scrapeTimeout).serviceMonitor.labelsare the labels your Prometheus selects ServiceMonitors by. Prometheus metrics lists the metrics.- The liveness and startup probes use
/healthz, the readiness probe/readyz.
Testing the chart
make helm-lint
make helm-test
make helm-lint runs helm lint --strict and helm template with the defaults and every values file under charts/kojo/ci, checks the vendored Agent Sandbox release, and runs kojo config validate on the kojo.yaml each values file renders. make helm-test installs the chart on a kind cluster with chart-testing and runs helm test, which curls /healthz and /readyz on kōjō and /readyz on a proxy replica’s admin port. go test ./test/chart/, which make helm-lint also runs, renders the chart with helm template and checks the proxy’s objects: the replicas, the headless admin Service, the readiness probe, the PodDisruptionBudget, the shared CA and the network policy. Chart tests has the details.