> This page is for Remediation Orchestrator.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/remediation-orchestrator/llms.txt.

# Relay Agent chart

`remediation-orchestrator-relay-agent` deploys the data-hall Agent built from
[`cmd/agent`](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/cmd/agent). It relays authenticated REST and gRPC requests
to a local NICo service. The Agent image starts `/bin/agent`; this chart supplies
its flags, not a replacement command.

The chart is disabled by default. It is independent of the server's application
and bootstrap charts and is not added to the server Helmfile stack. Install it
where the local NICo endpoint and credentials are available. Certificate-only
client releases can be installed separately in the server namespace.

## Image and prerequisites

NRO publishes no prebuilt Agent image. Build one from the application source root:

```sh
# Build the Linux amd64/arm64 image index without loading or publishing it.
bazel build //cmd/agent:agent.image.index
# Build an OCI bundle containing this chart pinned to that Agent image.
bazel build //:relay_agent_chart_with_image_bundle
```

For local Docker use, `bazel run //cmd/agent:agent.image.local_load` loads
`agent:latest`. Set `image.repository` and exactly one of `image.tag` or
`image.digest` when enabling the workload. `imagePullSecrets` defaults to an empty
list; supply your own registry credentials if needed. The server image is not a
compatible substitute for the Agent image.

The workload needs existing Secrets containing:

- A server certificate/key in `tls.serverSecretName`, unless server issuance is
  enabled, and trusted client CA material in `tls.clientCAConfigMap.name` or
  `tls.clientCASecretName`.
- Local NICo OAuth credentials in `ssa.secretName`, with keys `client_id` and
  `client_secret` by default.
- A NICo gRPC client certificate/key and server CA in
  `nicoGRPC.clientTLSSecretName`. To keep server trust separate from the client
  key, set `nicoGRPC.rootCAConfigMap.name` instead. Vault PKI issuance requires
  that ConfigMap with NICo server trust in `ca.crt`; the issued client Secret
  does not supply server trust.

Set `nicoRESTBaseURL`, `nicoGRPC.address`, `nicoGRPC.tlsServerName` and
`ssa.tokenURL`. This render-only example uses placeholder endpoints and names of
Secrets and a ConfigMap that must already exist; it does not provision credentials:

```yaml
enabled: true
image:
  repository: agent
  tag: latest
nicoRESTBaseURL: https://nico.example.com
nicoGRPC:
  address: nico.example.com:443
  tlsServerName: nico.example.com
  clientTLSSecretName: nico-client-tls
ssa:
  tokenURL: https://identity.example.com/token
  secretName: nico-ssa
tls:
  serverSecretName: relay-server-tls
  clientCAConfigMap:
    name: relay-client-ca
```

A chart-created client CA ConfigMap stores `ca.crt` and mounts it as
`tls.clientCAFile`. An external ConfigMap must already contain a key named by
`tls.clientCAFile`.

The Pod uses UID/GID 65532, a read-only root filesystem and no
ServiceAccount token. REST/gRPC use ports 8443/9443 by default; metrics use plain
HTTP on port 9090.

Optional integrations require their controllers and CRDs to be installed first:

| Values | Resources |
| --- | --- |
| `metrics.serviceMonitor.enabled`, default true | Prometheus ServiceMonitor |
| `gateway.enabled` | Envoy Gateway Gateway/EnvoyProxy, with TLS passthrough |
| `gateway.dns.enabled` | ExternalDNS DNSEndpoint when the dedicated gateway is enabled |
| `route.enabled`, `route.grpc.enabled` | TLSRoutes to a separately configured Gateway |
| `certificates.server.enabled` or `certificates.client.enabled` | cert-manager Issuer/Certificate, issuer token-request RBAC and approver-policy resources |
| `nicoGRPC.vaultPKI.enabled` | Vault Secrets Operator VaultAuth/VaultPKISecret |
| `ssa.vaultStaticSecret.enabled` | Vault Secrets Operator VaultStaticSecret |

Disable `metrics.serviceMonitor.enabled` when that CRD is absent. Workload
annotations support Stakater Reloader if installed. TLS passthrough leaves client
certificate verification in the Agent. No public exposure or ingress source
allowlist is supplied by default; installers own private reachability and policy.

## Certificate identities and namespaces

Before enabling certificate issuance:

- Install cert-manager with its controller ServiceAccount named `cert-manager`
  in namespace `cert-manager`. The TokenRequest and approval-policy bindings
  require that identity.
- Ensure cert-manager's built-in approver does not approve requests for these
  Issuers, so approver-policy can enforce the certificate limits. The cert-manager
  Helm value `disableAutoApproval=true` is available from v1.15.0. It disables the
  built-in approver cluster-wide and can stop all issuance without another
  approver. The cluster operator must configure safe approval coverage before
  disabling it, or otherwise exclude these Issuers from built-in approval.

Choose at most one of `certificates.server.enabled` and
`certificates.client.enabled` per release. The namespace guard requires the Helm
release namespace to equal the selected mode's `namespace` value. Configure that
value together with the existing Vault-bound subjects; changing this chart does
not provision Vault roles or change their trust.

The namespace defaults are `carbide-rest` for server certificate releases and
`maestro-system` for client certificate releases. Namespace, auth role,
ServiceAccount, Issuer, policy and Secret names remain configurable. For either
mode, provide `certificates.vault.server`, `certificates.vault.path`,
`certificates.vault.namespace`, the auth mount path and the server DNS name or
client common name. No Vault endpoint, signing path or Vault namespace is selected
for you. Vault Secrets Operator issuance also requires
`nicoGRPC.vaultPKI.vaultNamespace`.

With `certificates.server.enabled`, the Certificate, server volume and reload
annotation use `certificates.server.secretName`. The volume maps the issued
`tls.crt` and `tls.key` to `tls.certFile` and `tls.keyFile`. External server Secrets
keep their existing filenames. `tls.clientCASecretName` remains independently
configurable and may reference the issued Secret when it contains the intended
client CA.

Approval policies select the release namespace and their specific Issuer. Empty
`approvalPolicyName` values generate `<namespace>.<release>.<mode>-policy`, with
modes `server`, `client`, `call-home-server` and `call-home-agent`. Each policy's
cluster-scoped RBAC refers to that generated name. Explicit policy names must be
unique across the cluster.

`callHome.enabled` makes the Agent initiate its connection to the server. Supply
`callHome.address`, `authority`, `siteID` and client TLS Secret. With
`certificates.callHome.agentClient.enabled`, the Certificate, workload volume and
reload annotation use `certificates.callHome.agentClient.secretName`; otherwise
supply the external Secret through `callHome.clientTLSSecretName`. The chart passes
`--maestro-*` flags and uses `POD_NAME`/`SSA_CLIENT_ID` environment variables.
Optional call-home certificates use these identity formats:
`spiffe://<trust-domain>/maestro/agent/<tenant-UUID>/<site-ID>` and
`spiffe://<trust-domain>/maestro/replica/<replica-id>`. It requires the matching
server/client certificate mode and explicitly configured signing paths. Trust
domains must be lowercase DNS names. Agent tenant UUIDs must be non-zero and use
the 8-4-4-4-12 hex format. When both the call-home workload and Agent-client
issuance are enabled, the URI's site segment must equal `callHome.siteID`.

## Packages and validation

From the independent `helm/` module:

```sh
bazel build //charts:remediation_orchestrator_relay_agent_package
bazel build //charts:remediation_orchestrator_relay_agent_oci
bazel test //:remediation_orchestrator_relay_agent_chart_test \
  //:remediation_orchestrator_relay_agent_chart_helm3_test
```

The module's `//:chart_packages` includes this chart alongside the application
and bootstrap charts. The image-free `//:charts_bundle` and the existing
`nro_charts_with_image_bundle` macro retain only the two charts that run the
server image. Use the separate application-root relay bundle target above
for the Agent image. Builds do not publish or install resources.

Run the full module checks described in [validation](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/helm/VALIDATION.md) before
submitting changes. Offline tests render workload, image references,
certificate/namespace guards, call-home flags, Vault resources and passthrough
routes with Helm 3 and Helm 4. They do not establish controller compatibility,
issued certificates, network reachability or live mTLS connectivity.