Skip to main content
Version: v3.9.0

AgentConfig

Use kind: AgentConfig to create or update an Edgelet node record on the Controller API. This kind does not bootstrap Edgelet on a host.

When to use​

SituationApproach
Install Edgelet on a hostOmit AgentConfig. potctl synthesizes it from Agent or LocalAgent spec.config.
Change config on a node that already existsDeploy AgentConfig alone.
Order upstream names in one filePut AgentConfig documents before the nodes that depend on those names.
System node on a Controller hostControl plane deploy builds that record. It is not a standalone kind: Agent.

A control plane must already be in the namespace. How a pushed config reaches the host is in Configuration updates.

What deploy -f does​

potctl deploy -f agent-config.yaml -n my-ecn
deploy
  1. Validate router and NATS rules for an edge node versus a system node.
  2. Resolve upstreamRouters and upstreamNatsServers from Edgelet node names to UUIDs. Set host for an interior router when that role requires it.
  3. Create the node when it is missing. Otherwise patch the configuration.
  4. Wait until the node platform is ready, except a quiet system-node path.

Platform reconcile then creates the system application system-<agentName> with router and nats microservices, fabric CAs, and upstream links. See Networking and Applications.

In one file with Agent or LocalAgent, AgentConfig documents run in a batch before host bootstrap. When metadata.name matches, potctl merges host and tags from the node spec. After bootstrap, the node path may update AgentConfig again when spec.config is present.

potctl describe agent-config edge-node-1 -n my-ecn

describe agent-config prints nested routerConfig and natsConfig aligned with Controller storage. Use that output when you round-trip YAML.

Examples​

Config-only record. Names in upstreamRouters and upstreamNatsServers must already exist, or be created by an earlier document in the same deploy.

agent-config.yaml
apiVersion: datasance.com/v3
kind: AgentConfig
metadata:
name: edge-node-1
spec:
description: Config-only update
arch: amd64
host: 10.0.0.50
deploymentType: native
containerEngine: edgelet
upstreamRouters:
- default-router
routerConfig:
routerMode: edge
messagingPort: 5671
upstreamNatsServers:
- default-nats-hub
natsConfig:
natsMode: leaf
natsServerPort: 4222
memoryLimit: 4096
cpuLimit: 80
logLevel: INFO

Explicit AgentConfig, then the host install, in one file. The names match, so the AgentConfig batch runs before bootstrap.

agent-and-config.yaml
apiVersion: datasance.com/v3
kind: AgentConfig
metadata:
name: edge-node-2
spec:
arch: amd64
host: 10.0.0.60
upstreamRouters:
- default-router
routerConfig:
routerMode: edge
upstreamNatsServers:
- default-nats-hub
natsConfig:
natsMode: leaf
---
apiVersion: datasance.com/v3
kind: Agent
metadata:
name: edge-node-2
spec:
host: 10.0.0.60
ssh:
user: ubuntu
keyFile: ~/.ssh/id_rsa
package:
version: "1.1.0"
config:
arch: amd64
deploymentType: native
containerEngine: edgelet

On Agent and LocalAgent, the same configuration fields live under spec.config, not at the top of spec.

Fields​

AgentConfig fields

Group 3See anything wrong with the document? Help us improve it!