Skip to content

Open a namespace to coding agents

A deploy token can only be issued for a namespace an admin has opened to coding agents. None is open by default. Opening a namespace is the decision that lets a coding agent change it, so open only namespaces where you accept that.

What you need: the admin role. Opening namespaces and issuing tokens are both admin-only. See roles and permissions.

  1. Edit the cluster.

    Go to Admin → Clusters, edit the cluster, and open the Namespace policy tab.

  2. Name the namespace under Coding-agent deployable namespaces.

    This field is a comma-separated list. Leave it blank and no namespace is open. Use a dev or sandbox namespace, such as shop-dev.

  3. Save.

    Seylo checks the namespace against the cluster’s other settings before saving. See when Seylo refuses to open a namespace.

  4. Give the namespace a ResourceQuota.

    Coding-agent deploys into a namespace with no ResourceQuota are refused. See give the namespace a budget.

The namespace now appears in the Namespace list when you issue a token from Coding agents → Connect a coding agent on the Clusters page. That list shows only open namespaces.

An open namespace must still be inside the rest of the cluster’s policy:

  • It must be permitted by the cluster’s own lists. A namespace that the Allowed namespaces list doesn’t include, or that the Denied namespaces list names, is refused with a message beginning:

    These namespaces cannot be agent-deployable because this cluster's own policy already excludes them:

    Add the namespace to the allow-list, or remove it from the deny-list, first.

  • The in-cluster agent must have RBAC there. If the agent was installed for a list of namespaces, you can only open a namespace on that list. Otherwise the request is refused with a message beginning:

    The in-cluster agent has no RBAC in:

    Add the namespace to the agent’s watch list, re-run helm upgrade, then open it. On a cluster-wide install you can instead remove the list, as described in a fixed namespace list on a cluster-wide install. An agent installed cluster-wide without a list has nothing to contradict.

A coding agent can redeploy in a loop. The NetworkPolicy Seylo generates limits what a workload can reach, and only a quota limits what it can consume. So deploy refuses any namespace that has no ResourceQuota. Seylo also refuses when it can’t list the namespace’s quotas, because it treats “can’t tell” as “none”.

Any ResourceQuota in the namespace satisfies the check, including one you created yourself. To have Seylo write one:

  1. On Admin → Clusters, find the Coding agents card. An open namespace with no quota is listed there with a Set a budget button.

  2. Press Recommend from usage to fill in the fields from what the namespace uses now. If no usage is available, Seylo uses what the namespace requests. If there are no running pods, it uses the defaults. Change any field you want to.

    Field What it limits
    Namespace totals: CPU requests, Memory requests, CPU limits, Memory limits Everything in the namespace, whether an agent deployed it or not
    Maximum pods Pod count. This is the most effective limit on an agent that redeploys in a loop
    Per-container defaults Applied to any container that declares no resources of its own
  3. Press Preview YAML to see exactly what will be written.

  4. Press Apply to the cluster. Seylo writes both a ResourceQuota and a LimitRange. A quota on requests makes Kubernetes reject any pod that declares none. Without the LimitRange, workloads that rely on defaults would break.

A budget below what the namespace already counts needs your say-so. Seylo compares it with what the namespace’s quota already counts (its own used figure, not only the pods it can read). Kubernetes would accept a smaller budget and then refuse every new pod in the namespace: the next rollout or restart of any workload, every CronJob run, and any fix Nightshift would make there, until usage drops below it. So Seylo applies nothing, and the dialog says exactly that, with the numbers. Apply anyway - shrink the namespace applies it anyway; press it only if new pods should be blocked until the namespace shrinks. Recommend from usage fills in figures that fit. If the namespace cannot be read first, Seylo applies nothing until you retry, unless you acknowledge. The audit log records an acknowledged budget with the shortfalls you accepted.

A namespace that is already over its budget is listed on the Coding agents card with Raise the budget, which opens the dialog filled from what runs, never below it. Nightshift raises an alert for it too.

Coding agents can’t set or change a budget. There is no tool for it.

Remove the namespace from Coding-agent deployable namespaces and save.

  • Every token issued for that namespace is refused on its next call. Nobody has to revoke anything: Seylo checks whether the namespace is still open on every call.
  • Nothing already deployed is touched.
  • The namespace disappears from the token dialog’s Namespace list.