upgrade

package
v0.1.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package upgrade resolves release artifacts for a rolling cluster upgrade (T-95).

The control plane, not the node, decides what a node should install: it resolves the target version to a per-architecture asset URL and its SHA-256, and hands both to the agent. The node then verifies the digest before it executes anything. That ordering matters — a node that fetched its own checksum from the same host it fetched the binary from would be trusting one source to vouch for itself.

Index

Constants

View Source
const DefaultBaseURL = "https://github.com/zattera-dev/zattera/releases"

DefaultBaseURL is the official release host. Overridable for mirrors and air-gapped clusters; the agent independently refuses any URL outside its own configured base, so changing this alone cannot redirect a node.

This is NOT get.zattera.dev — that serves the install script only. Binaries live on GitHub Releases, and this must stay in step with GITHUB_REPO in install/install.sh: the two are the only ways a binary reaches a node, and they must install the same artifact.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	URL    string
	SHA256 string
}

Asset is one downloadable binary.

type HTTPResolver

type HTTPResolver struct {
	BaseURL string
	Client  *http.Client
	// contains filtered or unexported fields
}

HTTPResolver reads the release's checksum manifest over HTTP.

func NewHTTPResolver

func NewHTTPResolver(baseURL string) *HTTPResolver

NewHTTPResolver builds a resolver against a release host.

func (*HTTPResolver) Resolve

func (r *HTTPResolver) Resolve(ctx context.Context, version string) (Release, error)

Resolve fetches and parses the checksum manifest for a version. Results are cached: an upgrade run resolves once and reuses it for every node, so a release retagged mid-rollout cannot split the cluster across two builds.

type Release

type Release struct {
	Version string
	Assets  map[string]Asset
}

Release is a resolved version and its per-os/arch assets, keyed "linux/amd64".

func (Release) Asset

func (r Release) Asset(osArch string) (Asset, bool)

Asset returns the artifact for an os/arch as reported by Node.os_arch.

type Resolver

type Resolver interface {
	Resolve(ctx context.Context, version string) (Release, error)
}

Resolver turns a version (or "" for latest) into a Release.

Jump to

Keyboard shortcuts

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