Environments and stands

An environment is a named, versioned set of variables: everything a stand is made of. test, preprod and prod are the usual three; my laptop or demo work just as well. Each variable has a name, a kind (see Kinds of variables and secrets) and, for most kinds, a value.

Two things read an environment:

Who owns an environment

flowchart TB
  subgraph WS["Workspace"]
    W_TEST["test"]
    W_PRE["preprod"]
    W_PROD["prod — production"]
  end

  subgraph KB1["Knowledge base: payments"]
    K_PRE["preprod<br/>NAMESPACE=payments"]
  end

  subgraph KB2["Knowledge base: internal tool"]
    K_HIDE["prod hidden"]
  end

  subgraph ME["My environments"]
    M_ST["staging on my laptop"]
  end

  K_PRE -- "inherits everything else" --> W_PRE
  KB1 -. "test and prod used as they are" .-> WS
  K_HIDE -. "hides" .-> W_PROD

  W_PRE --> DOCS(["Code blocks in the workspace's knowledge bases"])
  W_PRE --> WSAGENTS(["Workspace agent setups"])
  M_ST --> MYAGENTS(["My agent setups"])

Owner

Where

Read by

Edited by

Workspace

Workspace settings → Environments

every knowledge base of the workspace, the workspace's agent setups

owners and admins

Knowledge base

Knowledge base → Connections → Environments

that knowledge base's code blocks

its admins

You

Settings → Agents → My environments

your own agent setups

you

Inheritance: set once, override what differs

Most values are the same for every knowledge base of a workspace: the registry, the cluster, the SSO host. So the workspace's environments are the base ones.

flowchart LR
  A["Workspace preprod<br/>REGISTRY=registry.example.test<br/>K8S_CLUSTER=pre-1<br/>NAMESPACE=default"]
  B["Knowledge base preprod<br/>NAMESPACE=payments"]
  C["What the reader gets<br/>REGISTRY=registry.example.test<br/>K8S_CLUSTER=pre-1<br/>NAMESPACE=payments"]
  A --> C
  B -- "overrides by name" --> C

Production

Mark an environment Production and it is shown in red wherever it is picked; code blocks filled from it get a red stripe, and running a command from one in the desktop terminal asks first, showing the command.

Versions

Every save is a new version. A task an agent is working on keeps the version it started with, so changing preprod does not change the values under a running task; the next task gets the new ones.

Who sees what