Files
spinifex/scripts/images/lb.conf
T
Josh Siviour 13eae4d40b fix(elbv2): tag-based LB AMI lookup with hard error on miss (#137)
Replace fragile image-name substring match (-lb-/-alb-) with a
DescribeImages tag filter on spinifex:managed-by=elbv2. Remove the
silent fallback that picks the first image in the store when no LB
image exists — CreateLoadBalancer now returns ServerInternal with a
remediation hint instead of persisting a record in StateFailed.

- daemon: tag filter + error return from the resolver closure
- service_impl: resolver signature is func() (string, error); caches
  only successful results so the next call retries after an error
- CreateLoadBalancer gate now requires launcher + networking; AMI is
  resolved inside the gate and failures short-circuit before persist
- admin images import: add --name+--file combo (catalog metadata with
  a local file source) and a --tag key=value flag for explicit tagging
  of file-only imports
- build-system-image.sh + lb.conf: propagate SYSTEM_TAG via --tag so
  locally built system AMIs get the right tag even when the catalog
  is bypassed

Closes mulga-969
2026-04-14 12:52:28 +10:00

27 lines
861 B
Plaintext

# LB system image manifest
# Used by build-system-image.sh to create an Alpine AMI with HAProxy + lb-agent
IMAGE_NAME="lb"
IMAGE_DESCRIPTION="LB VM with HAProxy and lb-agent"
ALPINE_VERSION="3.21.6"
IMAGE_SIZE="256M"
# Tag applied to the imported AMI so the daemon can discover this as the
# system image for ELBv2 load balancers. Must match tags.ManagedByELBv2.
SYSTEM_TAG="spinifex:managed-by=elbv2"
# Packages to install via apk
APK_PACKAGES="haproxy curl ca-certificates"
# Binaries to copy into the image (source:destination)
INSTALL_BINARIES="bin/lb-agent:/usr/local/bin/lb-agent"
# Build command for binaries (run before image build)
BUILD_COMMANDS="make build-lb-agent"
# OpenRC services to enable at boot
ENABLE_SERVICES="haproxy"
# Custom setup script (runs inside chroot after packages are installed)
SETUP_SCRIPT="scripts/images/lb-setup.sh"