enrollment

package
v0.14.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package enrollment registers an agent with the FallBCK server using a one-time token

Index

Constants

View Source
const ConfigFileName = "agent.yaml"

ConfigFileName is the agent configuration file inside the data directory

Variables

View Source
var AgentVersion = "0.1.0"

AgentVersion is reported to the server at enrollment; set by the agent binary

Functions

func Enroll added in v0.6.0

func Enroll(ctx context.Context, o Options) (*config.AgentConfig, error)

Enroll exchanges a one-time enrollment token for an agent identity and bearer token, and writes agent.yaml (and an optional server CA bundle) into the data directory. The enrollment request honours o.CACertPath / o.InsecureSkipVerify, so a server with a private or self-signed certificate can be enrolled with. Operator settings already present in an existing agent.yaml (db_backup, TLS options) are preserved.

func EnrollAgent

func EnrollAgent(ctx context.Context, serverURL, token, dataDir string) (*config.AgentConfig, error)

EnrollAgent enrolls a filesystem agent (see Enroll)

Types

type Options added in v0.6.0

type Options struct {
	ServerURL string
	Token     string
	// DataDir receives agent.yaml; default: the type's default data directory
	DataDir string
	// AgentType is config.AgentTypeFilesystem (default) or config.AgentTypeDatabase
	AgentType string
	// Version reported to the server (default AgentVersion)
	Version string
	// Hostname overrides the reported hostname (e.g. k8s-<cluster>); default os.Hostname()
	Hostname string
	// CACertPath is a PEM bundle of a private CA to trust for ServerURL; it is used for
	// the enrollment request itself and persisted in agent.yaml
	CACertPath string
	// InsecureSkipVerify disables certificate verification for ServerURL (enrollment
	// request and agent.yaml)
	InsecureSkipVerify bool
	// DockerSocket overrides the Docker daemon socket probed for the docker_host flag
	// (filesystem agents; default DOCKER_HOST or /var/run/docker.sock)
	DockerSocket string
	// DBEngines are the database engines this agent can back up (the combined
	// filesystem agent: by detected client tools, mssql always)
	DBEngines []string
}

Options parameterise an enrollment

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL