The default namespace
Each environment gets a namespace with the same name. Environmentprod-us deploys into namespace prod-us. Environment names can’t change, so the namespace can’t either. If you want a friendlier name in the dashboard, set a display name.
Every service type, blueprint child, and preview uses this namespace unless you say otherwise. Previews sharing one namespace is why two previews can’t reach each other by bare service name.
In templates, use {{ .ryvn.env.defaultNamespace }}. Blueprint templates can also use {{ EnvironmentNamespace }}.
Ryvn’s own namespaces
Platform components live apart from your workloads:
These are reserved. JIT access can’t target them and they never get application role bindings.
Using a different namespace
Setnamespace on the installation:
{{ .ryvn.env.defaultNamespace }} aren’t expanded here. Omit the field if you want the default.
On install, the agent creates the namespace if it’s missing and adds Ryvn’s labels. If it already exists, the agent just adds the labels. You don’t need to create it first.
The namespace can’t change after install. YAML sync rejects the change:
- Installation names must be unique across the whole environment, not just within a namespace.
- Same-namespace installations reach each other at
<installation>:<port>. Across namespaces, use<installation>.<namespace>.svc.cluster.local:<port>. - Importing an installation into another environment moves it to that environment’s default namespace, unless it had an explicit namespace.
Declaring namespaces on the environment
Use the environment’snamespaces list when a namespace needs to exist before anything is installed into it, or when you want labels on it. Pod Security Admission is the usual reason:
Labels
Ryvn finds its namespaces by label, not by name. The agent only watches labeled namespaces, and health reporting, secret distribution, pull credentials, and access bindings all follow that set.
The agent adds these itself. If it isn’t allowed to create or edit namespaces (a locked-down existing cluster), whoever runs the cluster needs to create the namespace with the first two labels before installing. Without them the install can succeed while the installation sits at Pending forever, because the agent can’t see the pods.
A namespace with both labels gets, automatically:
- Pull credentials for the Ryvn registry.
- Variable group secrets for the installations in it, named
<installation>-<variable-group>. ryvn-outputs-<installation>secrets carrying Terraform and blueprint outputs.- The role bindings JIT access grants resolve against.
What charts must not do
A chart deployed by Ryvn must not create or pin its own namespace. Both break health reporting in the same way: the installation shows Pending with zero pods while everything is actually running. Don’t templatekind: Namespace. Helm replaces the namespace object and wipes Ryvn’s labels, so the agent loses track of it. If an upstream chart has a namespace.create value, set it to false. And don’t use a chart just to create namespaces for other installations. Ryvn already creates any namespace a child names, so the chart is redundant, and because blueprint children install in no particular order it races the agent and fails with:
metadata.namespace on resources. Use {{ .Release.Namespace }} or leave it out. Ryvn looks for workloads in the release namespace, so resources pinned elsewhere never resolve to running pods.
If a chart needs a specific namespace, set namespace on the installation. If that namespace needs labels, declare it in the environment’s namespaces list.
Namespaces you create yourself
If your workloads create namespaces on the fly, Ryvn can’t see them until they’re labeled:ryvn.app/requires-registry-creds alone.
Kubernetes secrets don’t cross namespaces. A secretKeyRef can’t read a secret Ryvn put somewhere else, so anything that needs Ryvn-managed secrets has to run in a managed namespace. Copying secrets into unmanaged namespaces is on you. A Kyverno clone policy keyed on ryvn.app/installation-name is what customers usually do.
Scoped-down clusters
On clusters Ryvn provisions, the agent is cluster admin and all of the above just works. On an existing cluster with a narrower role, the agent needs to read workloads and write secrets in every namespace an installation targets, plus create or edit the namespace if you want Ryvn to make it. Symptoms that mean a permissions gap, not a chart problem:
Fastest unblock: drop the
namespace field and use the default. Split into separate namespaces once the RBAC for them exists.