Skip to main content
Version: v3.9.0

Agent fields

Reference for kind: Agent. Deploy flow is on Remote node. The same configuration block under spec.config is documented at spec.* on AgentConfig fields.

Deploy
apiVersion: datasance.com/v3 # required, string
kind: Agent # required, string
metadata:
name: edge-01 # required, string. Lowercase alphanumeric. Cannot be default-router
namespace: my-ecn # no, string. Must match -n when both are set
tags: [] # no, list of string
spec:
host: 10.0.0.5 # required, string. SSH target
ssh:
user: edge # required, string
keyFile: ~/.ssh/id_rsa # required, string
port: 22 # no, int, default 22
controllerEndpoint: https://controller.example.com:51121 # no, string
airgap: false # no, bool
package: # no, object
version: "1.1.0" # no, string
container:
image: ghcr.io/datasance/edgelet:1.1.0 # no, string. Used when deploymentType is container
registry: registry.example.com # no, string
username: pull-user # no, string. Set with registry and password
password: pull-token # no, string
wasm:
edgelet-wasmtime: # no, object. The key is the handler name
url: https://example.com/shim.tar.gz # no, string. Keep url or path
path: /opt/shims/edgelet-wasmtime.tar.gz # no, string. Keep url or path
sha256: "<sha256>" # no, string
scripts: # no, object. dir is required when this block is set
dir: /opt/bootstrap # required when scripts is set, string
deps:
entrypoint: deps.sh # no, string
args: [] # no, list of string
install:
entrypoint: install.sh # no, string
args: [] # no, list of string
uninstall:
entrypoint: uninstall.sh # no, string
args: [] # no, list of string
config:
description: Edge node # no, string
location: plant-a # no, string
latitude: 0.0 # no, float
longitude: 0.0 # no, float
arch: amd64 # recommended, string. amd64, arm64, arm, or riscv64
host: 10.0.0.5 # no, string
deploymentType: native # no, string, default native
containerEngine: edgelet # no, string, default edgelet
containerEngineUrl: unix:///run/edgelet/containerd.sock # no, string
networkInterface: eth0 # no, string
diskLimit: 10 # no, int64. GiB
diskDirectory: /var/lib/edgelet # no, string
memoryLimit: 1024 # no, int64. MiB
cpuLimit: 100 # no, int64. 100 is one core
logLimit: 100 # no, int64
logDirectory: /var/log/edgelet # no, string
logFileCount: 5 # no, int64
statusFrequency: 10 # no, float
changeFrequency: 10 # no, float
watchdogEnabled: true # no, bool
logLevel: info # no, string
pruningFrequency: 60 # no, float
availableDiskThreshold: 80 # no, float. Percent
timeZone: UTC # no, string
gpsMode: off # no, string
gpsScanFrequency: 0 # no, float
gpsDevice: /dev/ttyUSB0 # no, string
edgeGuardFrequency: 0 # no, float. Seconds. 0 disables
upstreamRouters: # no, list of string
- default-router
routerConfig:
routerMode: edge # no, string, default edge
messagingPort: 5671 # no, int, default 5671
edgeRouterPort: 45671 # no, int. Interior mode only
interRouterPort: 55671 # no, int. Interior mode only
upstreamNatsServers: # no, list of string
- default-nats-hub
natsConfig:
natsMode: leaf # no, string, default leaf
natsServerPort: 4222 # no, int, default 4222
natsLeafPort: 7422 # no, int, default 7422
natsClusterPort: 6222 # no, int. Server mode only
natsMqttPort: 8883 # no, int, default 8883
natsHttpPort: 8222 # no, int, default 8222
jsStorageSize: 10G # no, string, default 10G
jsMemoryStoreSize: 1G # no, string, default 1G

Not deployed​

These fields come back from describe. Leave them out of the file you pass to deploy.

uuid: "<uuid>" # describe only, string
created: "<timestamp>" # describe only, string

The Controller identity is metadata.name. potctl passes that name to validation and to AgentConfig. metadata.namespace, when set, must match -n.

metadata.name is lowercase alphanumeric. It cannot be default-router.

CLI and host fields​

These fields are not the AgentConfig API body by themselves.

FieldTypeRequiredDescription
hoststringYesSSH target host or IP
ssh.userstringYesSSH user
ssh.keyFilestringYesPrivate key path. ~ is expanded.
ssh.portintNoDefault 22
controllerEndpointstringNoProvision URL. Default is the namespace control plane.
airgapboolNoStage binaries and images from the operator cache
uuidstringNoRead-only after deploy
createdstringNoRead-only CLI timestamp after deploy

spec.host is the SSH target. spec.config.host is the host registered on the Controller. They may differ.

potctl rejects a non-system Agent on the same hostname as the Controller public URL. See Remote node.

spec.package​

Optional Edgelet binary, container image, and WASM shims for bootstrap.

FieldTypeDescription
versionstringEdgelet version passed to the native install layer. Use 1.1.0 on this train.
container.imagestringImage when deploymentType is container
container.registrystringRegistry hostname for a private pull
container.usernamestringWith registry and password
container.passwordstring
wasm.<handler>objectWASM shim pack for a handler (spin, edgelet-wasm, and similar)
wasm.<handler>.urlstringHTTP(S) tarball. potctl extracts it locally.
wasm.<handler>.pathstringLocal path for a fully offline operator
wasm.<handler>.sha256stringOptional integrity check

WASM install runs only on Linux, deploymentType: native, and containerEngine edgelet or docker. See WASM scope.

When spec.package.container.image is set, potctl may set deploymentType: container if config does not already set it.

spec.scripts​

Optional override of embedded bootstrap layers. dir is required when the block is present. It is a directory on the operator machine.

FieldDescription
dirDirectory potctl reads, then stages onto the host
deps.entrypoint / deps.argsCustom dependency layer
install.entrypoint / install.argsCustom Edgelet install
uninstall.entrypoint / uninstall.argsCustom uninstall

Merge rules and the layer order are on Bootstrap.

spec.config​

Controller AgentConfig plus the values Edgelet materializes on the host. There is no config.name on kind: Agent. Identity is metadata.name.

Standalone kind: AgentConfig uses the same fields at spec.*.

Identity and geo​

FieldTypeRequiredDescription
config.descriptionstringNoFree text
config.locationstringNoLocation label
config.latitudefloatNoGeo latitude
config.longitudefloatNoGeo longitude
config.archstringRecommendedamd64, arm64, arm, riscv64. Synced to Controller archId at deploy.

Runtime​

FieldTypeDefault (edge)Description
config.hoststringOften the same as spec.hostController host. Required for some router modes.
config.deploymentTypestringnativenative or container
config.containerEnginestringedgeletedgelet, docker, or podman
config.containerEngineUrlstringEngine defaultFor example unix:///run/edgelet/containerd.sock
config.networkInterfacestringInterface to bind

config.isSystem is not settable in this YAML. System nodes use control plane systemAgent.

Resource limits and logging​

FieldTypeDescription
config.diskLimitint64Disk quota (GiB)
config.diskDirectorystringData directory on the host
config.memoryLimitint64Memory limit (MiB)
config.cpuLimitint64CPU limit. 100 is one core.
config.logLimitint64Log size limit
config.logDirectorystringLog directory
config.logFileCountint64Rotated log file count
config.statusFrequencyfloatStatus report interval
config.changeFrequencyfloatChange detection interval
config.watchdogEnabledboolWatchdog
config.logLevelstringFor example INFO or info
config.pruningFrequencyfloatPrune interval. See Image pruning.
config.availableDiskThresholdfloatDisk pressure threshold (%)
config.timeZonestringHost timezone

GPS and EdgeGuard​

FieldTypeDescription
config.gpsModestringFor example auto or off
config.gpsScanFrequencyfloatGPS scan interval
config.gpsDevicestringDevice path or selector
config.edgeGuardFrequencyfloatEdgeGuard interval in seconds. 0 disables. See EdgeGuard.

HAL and Bluetooth agent fields from older releases are retired in v3.9.

Router​

Fabric behavior is on Router fabric.

FieldTypeDescription
config.upstreamRouters[]stringUpstream router node names. Resolved to UUIDs at deploy.
FieldTypeDefault (edge)Description
config.routerConfig.routerModestringedgeedge, interior, or none
config.routerConfig.messagingPortint5671Messaging AMQP port
config.routerConfig.edgeRouterPortintInterior mode only
config.routerConfig.interRouterPortintInterior mode only

Edge nodes: Do not set edgeRouterPort or interRouterPort when mode is edge. Interior ports are for an interior role, including system nodes on Controller hosts.

NATS​

Fabric behavior is on NATS fabric.

FieldTypeDescription
config.upstreamNatsServers[]stringNATS server node names. Resolved to UUIDs at deploy.
FieldTypeDefault (edge)Description
config.natsConfig.natsModestringleafleaf, server, or none
config.natsConfig.natsServerPortint4222Client port
config.natsConfig.natsLeafPortint7422Leaf port
config.natsConfig.natsClusterPortintServer mode only
config.natsConfig.natsMqttPortint8883MQTT
config.natsConfig.natsHttpPortint8222Monitoring HTTP
config.natsConfig.jsStorageSizestring10GJetStream storage
config.natsConfig.jsMemoryStoreSizestring1GJetStream memory

Do not set natsClusterPort unless natsMode is server.

Deploy-time processing​

StepBehavior
PrepareEdge defaults: router edge, NATS leaf, standard ports when omitted
ProcessResolve upstream names to UUIDs. Apply interior router host rules.
ValidateRouter and NATS mode matrix before create or update
BootstrapHost config.yaml is written from this config where that step applies

config.archId is derived from config.arch. Do not set the two inconsistently.

Daemon status, usage, platform phase, and runtime status come from describe agent and describe agent-config. They are not deploy YAML fields. That includes modelStatus, activeModels, knowledgeStatus, and activeKnowledge.

spec.airgap​

When airgap is true:

  • Native install stages the Edgelet binary from ~/.iofog/v3/airgap-binaries/ and related caches, and passes airgap flags to install.
  • Images are loaded on the host with edgelet image load when that path applies.

Set a coherent spec.config.arch and package metadata.

Deploy order​

StepWhat runs
1AgentConfig create or update, then wait for platform ready
2Ensure AgentConfig and resolve deployment type
3Optional airgap and WASM staging
4Script merge and bootstrap
5AgentConfig update when spec.config is set
6Provision and namespace persist
Group 3See anything wrong with the document? Help us improve it!