operator

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package operator is what fortressctl does on the operator's side: bake a release ISO with fortress.yml, and put a policy on a running edge.

Index

Constants

This section is empty.

Variables

View Source
var ErrDrift = errors.New("the edge's policy differs from the file")

ErrDrift is Diff's result when the edge's policy is not the file's.

Functions

func Apply

func Apply(e Edge, path string, out io.Writer) error

Apply puts the policy.yml at path on the edge. It is checked here first, so a mistake is reported without a round trip.

func Bake

func Bake(out, iso, edgePath string) error

Bake writes out: the release ISO at iso with the fortress.yml at edgePath in its initramfs, as it is. It must be a valid fortress.yml. Two bakes of the same files differ in the ISO's timestamps only.

func Diff

func Diff(e Edge, path string, out io.Writer) error

Diff compares the edge's policy with the policy.yml at path, byte for byte, and writes a unified diff when they differ: fortressctl apply would change the edge. The edge keeps what apply sent, so a file that was applied reads back the same.

func ReadEdge

func ReadEdge(path string) ([]byte, error)

ReadEdge reads and checks a fortress.yml.

Types

type Edge

type Edge struct {
	Name string
	// Connect is host:port to dial instead of Name:443, for an edge that
	// DNS does not point at yet.
	Connect string
	// CACert is a PEM file of roots for the edge's certificate: the ACME
	// server's CA. Empty is the system roots.
	CACert    string
	Cert, Key string // an ops/<name> client certificate
}

Edge is how fortressctl reaches one edge's ops API: by its fqdn, which is the SNI and the name its certificate is for, with an operator's client certificate.

Jump to

Keyboard shortcuts

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