NexoTrafficSplit
:::tip Reconciled
The selected Operator registers this Kind. Runtime effect still requires a valid reference from the owning Proxy graph and a compatible runtime component.
:::
This page documents the current development contract. Schema acceptance, Operator reconciliation, and runtime enforcement are separate claims; the status above is authoritative.
API identity
| Property | Value |
|---|---|
| Kind | NexoTrafficSplit |
| API group | nexo.io |
| Version | v1alpha1 |
| Resource | nexotrafficsplits |
| Short name | nts |
| Scope | Namespaced |
| Operator support | Reconciled |
Purpose and relationships
Configures weighted, rule-based, canary, or shadow traffic distribution.
It has runtime effect only when a NexoPipeline referenced by a NexoProxy includes this object in a compatible phase and the selected Operator/runtime bundle supports the contract.
Spec field reference
The table is derived from the installed Nexo Edge CRD OpenAPI schema. “Not declared” means the schema publishes no default. A missing schema description is reported explicitly rather than inferred from implementation.
| Field | Type | Required | Default | Schema description |
|---|---|---|---|---|
spec.splitBy | string | No | Not declared | No description is declared in the CRD schema. Allowed values: request, connection, collection. |
spec.targets | array<object> | No | Not declared | No description is declared in the CRD schema. |
spec.targets[].name | string | Yes | Not declared | No description is declared in the CRD schema. |
spec.targets[].address | string | Yes | Not declared | No description is declared in the CRD schema. |
spec.targets[].weight | integer (int32) | Yes | Not declared | No description is declared in the CRD schema. |
spec.targets[].tls | boolean | No | Not declared | No description is declared in the CRD schema. |
spec.targets[].shadow | boolean | No | Not declared | No description is declared in the CRD schema. |
spec.targets[].sampleRate | number (double) | No | Not declared | No description is declared in the CRD schema. |
spec.rules | array<object> | No | Not declared | No description is declared in the CRD schema. |
spec.rules[].weight | integer (int32) | Yes | Not declared | No description is declared in the CRD schema. |
spec.rules[].target | string | Yes | Not declared | No description is declared in the CRD schema. |
spec.rules[].conditions | object | No | Not declared | No description is declared in the CRD schema. |
spec.gradualRollout | object | No | Not declared | No description is declared in the CRD schema. |
spec.gradualRollout.enabled | boolean | No | Not declared | No description is declared in the CRD schema. |
spec.gradualRollout.targetName | string | No | Not declared | No description is declared in the CRD schema. |
spec.gradualRollout.startWeight | integer (int32) | No | Not declared | No description is declared in the CRD schema. |
spec.gradualRollout.endWeight | integer (int32) | No | Not declared | No description is declared in the CRD schema. |
spec.gradualRollout.durationSec | integer (int32) | No | Not declared | No description is declared in the CRD schema. |
spec.canaryHealth | object | No | Not declared | No description is declared in the CRD schema. |
spec.canaryHealth.enabled | boolean | No | Not declared | No description is declared in the CRD schema. |
spec.canaryHealth.targetName | string | No | Not declared | No description is declared in the CRD schema. |
spec.canaryHealth.errorThresholdPct | integer (int32) | No | Not declared | No description is declared in the CRD schema. |
spec.canaryHealth.minRequests | integer (int32) | No | Not declared | No description is declared in the CRD schema. |
spec.headerRouting | object | No | Not declared | No description is declared in the CRD schema. |
spec.headerRouting.enabled | boolean | No | Not declared | No description is declared in the CRD schema. |
spec.headerRouting.field | string | No | Not declared | No description is declared in the CRD schema. |
spec.headerRouting.values | object | No | Not declared | No description is declared in the CRD schema. |
spec.abMetrics | object | No | Not declared | No description is declared in the CRD schema. |
spec.abMetrics.enabled | boolean | No | Not declared | No description is declared in the CRD schema. |
Status fields and conditions
| Field | Type | Required | Default | Schema description |
|---|---|---|---|---|
status.ready | boolean | No | Not declared | No description is declared in the CRD schema. |
status.observedGeneration | integer (int64) | No | Not declared | No description is declared in the CRD schema. |
status.configHash | string | No | Not declared | No description is declared in the CRD schema. |
status.conditions | array<object> | No | Not declared | No description is declared in the CRD schema. |
status.conditions[].type | string | No | Not declared | No description is declared in the CRD schema. |
status.conditions[].status | string | No | Not declared | No description is declared in the CRD schema. |
status.conditions[].reason | string | No | Not declared | No description is declared in the CRD schema. |
status.conditions[].message | string | No | Not declared | No description is declared in the CRD schema. |
status.conditions[].lastTransitionTime | string (date-time) | No | Not declared | No description is declared in the CRD schema. |
status.conditions[].observedGeneration | integer (int64) | No | Not declared | No description is declared in the CRD schema. |
A Ready or configHash value proves that the Operator accepted/hashed the object; it does not by itself prove runtime execution or policy enforcement.
Reconciliation and watch behavior
The registered controller validates the resource and records status. Data-path changes are applied only when the relevant NexoProxy controller rebuilds or reloads the owning graph.
At startup, the current NexoProxy controller installs a typed watch when the CRD is discoverable. A CRD installed after Operator startup requires an Operator restart before that reference watch is added.
Runtime execution effect
When successfully rendered as a router, it chooses primary and optional shadow targets according to configured weights and rules.
Example
Use placeholders and validate in a non-production namespace first. For schema-only or ineffective kinds, this example is for schema inspection only and must not be used as evidence of enforcement.
apiVersion: nexo.io/v1alpha1
kind: NexoTrafficSplit
metadata:
name: <split-name>
namespace: <namespace>
spec:
splitBy: request
targets:
- name: primary
address: <primary-host>:27017
weight: 100
tls: true
Update and reconciliation caveats
- Set targets[].tls to true for production upstreams and verify trusted-CA and server-name validation in the selected bundle. Omitting it or setting false sends MongoDB authentication and application traffic upstream without TLS.
- Apply component and pipeline changes before expecting the owning NexoProxy graph to change.
- Check metadata.generation, status.observedGeneration when present, and the owning Proxy graphRevision/appliedRevision after every update.
- A successful kubectl apply proves only schema admission; inspect Operator conditions, generated configuration, rollout state, and runtime behavior separately.
Release-specific limitations
- The API is v1alpha1 and has no conversion webhook or second served version.
- The CRD schema is retained by Helm and can outlive the Operator release that installed it.
- Current documentation can describe unreleased development behavior; verify the exact deployed bundle and image digests.
Inspect with kubectl
kubectl get nexotrafficsplits --namespace <namespace>
kubectl describe nexotrafficsplits <name> --namespace <namespace>
kubectl get nexotrafficsplits <name> --namespace <namespace> -o yaml
kubectl get crd nexotrafficsplits.nexo.io -o yaml
For resources participating in a Proxy graph, also inspect:
kubectl get nexoproxy <proxy-name> --namespace <namespace> \
-o jsonpath='{.status.phase}{" graph="}{.status.graphRevision}{" applied="}{.status.appliedRevision}{"\n"}'
kubectl get nexopipeline <pipeline-name> --namespace <namespace> -o yaml