The four priority bands
Priorities run from 0 to 99,999, divided into four bands by convention. Each band is the home for a different kind of policy:| Band | Priority range | Typical owner | Purpose |
|---|---|---|---|
platform-override | 0–99 | Platform / security team | Non-negotiable rules that take precedence over everything else. |
namespace | 100–9,999 | Namespace owners | Policies scoped to a single namespace’s traffic. |
platform-baseline | 10,000–19,999 | Platform team | Cluster-wide defaults and baselines, including the policies generated by defaultMode. |
workload | 20,000–99,999 | Application teams | Fine-grained, workload-specific policies. |
platform-override rule wins over anything below it, and a namespace policy is evaluated before a workload policy.
A policy’s priority is a single integer in the 0–99,999 range, and the admission webhook enforces these band boundaries — so precedence stays predictable as more teams add policies. The default priority is
100, in the namespace band.How evaluation works
Nyx resolves a connection in two nested passes:- Across policies — by priority. Every policy that could match the connection is ordered by priority, lowest number first.
- Within a policy — top-down. Inside each policy, rules are checked in the order they’re written. The first rule that matches decides the verdict, and evaluation stops there.
When nothing matches
If no rule in any policy matches a connection, Nyx applies the cluster’sdefaultMode, set in NyxClusterConfig. That backstop — allow, deny-cross-namespace, or deny — is why a freshly installed cluster with no policies still has well-defined behaviour.
A worked example
Suppose two policies could apply to a pod’s outbound connection to the public internet:- A
workloadpolicy at priority25000that allows egress to0.0.0.0/0. - A
platform-overridepolicy at priority50that denies egress to the public internet.
50 is lower than 25000, the override is evaluated first. Its deny rule matches, the connection is blocked, and the workload’s allow rule is never reached. This is how a platform team enforces guardrails that application teams can’t override — by placing them in the platform-override band.