Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
8afb452
docs: propose PXE installation architecture
scotwells Nov 14, 2026
bfea7d8
docs: align PXE authority with offerings and BMC lifecycle
scotwells Nov 14, 2026
dfecccd
docs: keep PXE summary additive to shared Fleet design
scotwells Nov 14, 2026
bc21d50
docs: separate PXE overview link from companion additions
scotwells Nov 14, 2026
0a51385
feat(executor): bind terminal results to the exact request
scotwells Nov 18, 2026
f6828a8
feat(standalone): add a reinstall phase and a disposable kind smoke
scotwells Nov 18, 2026
0333f6e
fix(standalone): wait for the simulator Service before a smoke phase
scotwells Nov 19, 2026
5b65485
feat(localvm): install a real OS over firmware PXE into a disposable VM
scotwells Nov 18, 2026
50ed07c
feat(multiplane): local Milo, Karmada and kro acceptance with Flux-ow…
scotwells Nov 18, 2026
8c38ad8
feat(redfish): Redfish executor on gofish with a DMTF emulator lab mode
scotwells Nov 18, 2026
db99e2c
feat(bootnet): DHCP boot reservations with served and withdrawn evidence
scotwells Nov 19, 2026
71b659a
feat(inventory): observe NetBox devices as observed-only evidence
scotwells Nov 19, 2026
4376f28
Merge main into the NetBox inventory staging branch
scotwells Nov 19, 2026
169c82b
test(inventory): run the observer as its service account against envtest
scotwells Nov 19, 2026
dcc83c9
Merge feat/netbox-inventory-import into the staging branch
scotwells Nov 19, 2026
f1ccd49
fix(inventory): stop contacting NetBox after a rejected credential
scotwells Nov 19, 2026
33d0077
Merge feat/netbox-inventory-import into the staging branch
scotwells Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,41 @@ jobs:
- run: kustomize build config/milo >/dev/null
- run: kustomize build config/overlays/management-plane >/dev/null
- run: kustomize build config/overlays/synthetic-staging >/dev/null
- run: kustomize build config/inventory-observer >/dev/null
- run: ./hack/validate-synthetic-staging-render.sh
- run: ./hack/validate-overlay-isolation.sh
- run: ./hack/test-overlay-isolation.sh
- run: ./hack/validate-standalone-render.sh
- run: ./hack/test-standalone-source-id.sh
- run: ./hack/test-standalone-preflight.sh
- run: ./hack/test-standalone-build-context.sh
- run: ./hack/test-run-standalone-smoke.sh
- run: ./hack/validate-doc-links.sh
- run: ./hack/multiplane/test-harness.sh
- run: shellcheck -S warning hack/multiplane/*.sh hack/local-vm/run.sh hack/local-vm/start-libvirt hack/local-vm/site-runtime
standalone-smoke:
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with: {go-version-file: go.mod, cache: true}
- uses: imranismail/setup-kustomize@v2
with: {kustomize-version: 5.8.1}
- name: Install pinned kind and kubectl
shell: bash
run: |
set -euo pipefail
go install sigs.k8s.io/kind@v0.31.0
directory=$(mktemp -d)
trap 'rm -rf "$directory"' EXIT
cd "$directory"
curl --fail --location --retry 3 --max-time 60 -o kubectl https://dl.k8s.io/release/v1.35.0/bin/linux/amd64/kubectl
curl --fail --location --retry 3 --max-time 60 -o kubectl.sha256 https://dl.k8s.io/release/v1.35.0/bin/linux/amd64/kubectl.sha256
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
chmod +x kubectl
mkdir -p "$HOME/.local/bin"
mv kubectl "$HOME/.local/bin/kubectl"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run disposable standalone smoke
run: ./hack/run-standalone-smoke.sh
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
images: |
- { path: config/base/manager, name: ghcr.io/datum-cloud/fleet, tag: "${{ needs.publish-container-image.outputs.tag }}" }
- { path: config/overlays/synthetic-staging, name: ghcr.io/datum-cloud/fleet, tag: "${{ needs.publish-container-image.outputs.tag }}" }
- { path: config/inventory-observer, name: ghcr.io/datum-cloud/fleet, tag: "${{ needs.publish-container-image.outputs.tag }}" }
- { path: config/components/consumer-ui-plugin, name: ghcr.io/datum-cloud/fleet-consumer-ui-plugin, tag: "${{ needs.publish-consumer-ui-plugin-image.outputs.tag }}" }
- { path: config/components/provider-ui-plugin, name: ghcr.io/datum-cloud/fleet-provider-ui-plugin, tag: "${{ needs.publish-provider-ui-plugin-image.outputs.tag }}" }
secrets: inherit
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@
# Local agent settings
.claude/settings.local.json
.claude/worktrees/

# Python tooling caches
__pycache__/
*.py[cod]

# Flux install manifest downloaded and verified by hack/multiplane/flux.py; never committed.
config/multiplane/flux/gotk-components.yaml

# Locally built binaries
/fleet-multiplane
/fleet-local-vm
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ The first bare-metal release must exercise a standalone customer workload on a
qualified OS other than Talos, without requiring a managed cluster or an ongoing
guest agent. Provisioning engines and provider integrations remain pluggable.

The [PXE installation enhancement](docs/enhancements/pxe-installation/README.md)
proposes managed images and bounded delegation to customer PXE. The
[boot network enhancement](docs/enhancements/boot-network/README.md) proposes
DHCP reservations that exist only while a machine's network boot is admitted.

## Learn more

Start with the [product overview and documentation guide](docs/README.md) to
Expand Down
47 changes: 47 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,53 @@
version: '3'

tasks:
standalone:test:
desc: Run the synthetic lifecycle in a disposable local kind cluster.
cmds:
- ./hack/run-standalone-smoke.sh

multiplane:acceptance:
desc: Fresh local Milo/Karmada/kro/PXE acceptance, every service installed by per-cluster Flux from the checkout, in the task-owned Colima profile (exit 0 pass, 1 fail, 2 preflight, 3 blocked, 4 timeout).
env:
# Explicit opt-in for the documented reversible inotify adjustment inside the task VM only.
FLEET_MULTIPLANE_INOTIFY: '1024'
cmds:
- ./hack/multiplane/run.sh {{.CLI_ARGS}}

multiplane:redfish-acceptance:
desc: "The multi-plane acceptance in Redfish mode: workers drive two persistent lab VMs only through the DMTF Redfish Interface Emulator and its lab adapter (same exit codes)."
env:
FLEET_MULTIPLANE_INOTIFY: '1024'
cmds:
- ./hack/multiplane/run.sh --redfish {{.CLI_ARGS}}

multiplane:preflight:
desc: Check local prerequisites and implementation readiness without creating resources.
env:
FLEET_MULTIPLANE_INOTIFY: '1024'
cmds:
- ./hack/multiplane/run.sh --preflight-only {{.CLI_ARGS}}

multiplane:stop:
desc: Stop (never delete) one retained run's exact containers; custody stays Unknown.
requires:
vars: [STATE]
cmds:
- ./hack/multiplane/stop.sh "{{.STATE}}"

multiplane:test-harness:
desc: Offline tests for the multi-plane harness with fake runtime tools.
cmds:
- ./hack/multiplane/test-harness.sh

local-vm:acceptance:
desc: Single-plane local VM PXE acceptance with explicit TCG in the task-owned Colima profile.
env:
DOCKER_CONTEXT: colima-fleet-acceptance-tcg
FLEET_LOCAL_VM_ACCEL: tcg
cmds:
- bash hack/local-vm/run.sh

manifests:validate:
desc: Render and validate the production Fleet and Milo manifest roots.
cmds:
Expand Down
6 changes: 5 additions & 1 deletion build/manager.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -trimpath -ldflags='-s -w' -o /out/fleet-manager ./cmd/fleet-manager \
&& CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -trimpath -ldflags='-s -w' -o /out/fleet-simulator ./cmd/fleet-simulator
&& CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -trimpath -ldflags='-s -w' -o /out/fleet-simulator ./cmd/fleet-simulator \
&& CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -trimpath -ldflags='-s -w' -o /out/fleet-dhcp-sync ./cmd/fleet-dhcp-sync \
&& CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -trimpath -ldflags='-s -w' -o /out/fleet-inventory-observer ./cmd/fleet-inventory-observer

FROM gcr.io/distroless/static-debian12:nonroot@sha256:afa5c872c891853ca7fcf1f12c3edb23f7eeef36189728842dd51042ff57f7ab
COPY --from=build /out/fleet-manager /fleet-manager
COPY --from=build /out/fleet-simulator /fleet-simulator
COPY --from=build /out/fleet-dhcp-sync /fleet-dhcp-sync
COPY --from=build /out/fleet-inventory-observer /fleet-inventory-observer
ENTRYPOINT ["/fleet-manager"]
58 changes: 58 additions & 0 deletions cmd/fleet-dhcp-sync/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// fleet-dhcp-sync runs beside one Kea DHCPv4 instance. It applies a site's
// boot-reservation feed through Kea's control socket and reports each applied
// revision back to the site, which retains it as boot and revocation evidence.
package main

import (
"context"
"errors"
"flag"
"fmt"
"log/slog"
"net/http"
"net/url"
"os"
"os/signal"
"strings"
"syscall"
"time"

"go.datum.net/fleet/internal/dhcpsync"
)

func main() {
var feed, tokenPath, instance, socket, base string
var interval time.Duration
flag.StringVar(&feed, "feed", "", "site DHCP feed origin, https://host[:port]")
flag.StringVar(&tokenPath, "token-file", "", "file holding the synchronizer bearer token")
flag.StringVar(&instance, "instance", os.Getenv("POD_NAME"), "stable name of this Kea instance")
flag.StringVar(&socket, "kea-socket", "/run/kea/kea4-ctrl-socket", "Kea DHCPv4 unix control socket")
flag.StringVar(&base, "base-config", "/etc/kea/kea-dhcp4.conf", "Kea configuration without Fleet reservations")
flag.DurationVar(&interval, "interval", 5*time.Second, "feed poll interval")
flag.Parse()
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
if err := run(logger, feed, tokenPath, instance, socket, base, interval); err != nil && !errors.Is(err, context.Canceled) {
logger.Error("dhcp sync stopped", "error", err)
os.Exit(1)
}
}

func run(logger *slog.Logger, feed, tokenPath, instance, socket, base string, interval time.Duration) error {
u, err := url.Parse(feed)
if err != nil || u.Scheme != "https" || u.Host == "" || (u.Path != "" && u.Path != "/") || u.RawQuery != "" || u.User != nil {
return errors.New("feed must be an https origin")
}
token, err := os.ReadFile(tokenPath)
if err != nil {
return fmt.Errorf("token: %w", err)
}
transport := http.DefaultTransport.(*http.Transport).Clone()
transport.Proxy = nil
s := &dhcpsync.Syncer{
Feed: u.Scheme + "://" + u.Host, Token: strings.TrimSpace(string(token)), Instance: instance, Socket: socket, Base: base,
HTTP: &http.Client{Timeout: 15 * time.Second, Transport: transport, CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }},
}
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()
return s.Run(ctx, interval, func(err error) { logger.Warn("sync cycle failed", "error", err) })
}
92 changes: 92 additions & 0 deletions cmd/fleet-inventory-observer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// fleet-inventory-observer refreshes InventoryObservation status from NetBox
// once and exits. It reads NetBox with GET requests only and writes only the
// status subresource of existing observations in one namespace.
package main

import (
"context"
"errors"
"flag"
"fmt"
"log/slog"
"net/http"
"os"
"os/signal"
"syscall"
"time"

"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

inventoryv1 "go.datum.net/fleet/internal/api/inventory/v1alpha1"
"go.datum.net/fleet/internal/inventoryobserver"
"go.datum.net/fleet/internal/netbox"
)

func main() {
var namespace, origin, tokenFile string
var timeout time.Duration
flag.StringVar(&namespace, "namespace", os.Getenv("POD_NAMESPACE"), "namespace holding InventoryObservations")
flag.StringVar(&origin, "netbox-url", os.Getenv("NETBOX_URL"), "NetBox origin, https://host[:port]")
flag.StringVar(&tokenFile, "netbox-token-file", "", "file holding a read-only NetBox API token")
flag.DurationVar(&timeout, "timeout", 2*time.Minute, "deadline for the whole refresh")
flag.Parse()
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
ctx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
if err := run(ctx, logger, namespace, origin, tokenFile); err != nil {
logger.Error("inventory observation refresh incomplete", "error", err)
os.Exit(1)
}
}

func run(ctx context.Context, logger *slog.Logger, namespace, origin, tokenFile string) error {
if namespace == "" || origin == "" || tokenFile == "" {
return errors.New("--namespace, --netbox-url, and --netbox-token-file are required")
}
source, err := netbox.NewClient(origin, func() (string, error) {
data, err := os.ReadFile(tokenFile)
return string(data), err
}, &http.Client{Timeout: 30 * time.Second})
if err != nil {
return err
}
scheme := runtime.NewScheme()
if err := inventoryv1.AddToScheme(scheme); err != nil {
return err
}
config, err := ctrl.GetConfig()
if err != nil {
return err
}
kube, err := client.New(config, client.Options{Scheme: scheme})
if err != nil {
return err
}
observer := &inventoryobserver.Observer{Client: kube, Namespace: namespace, NetBox: source}
results, err := observer.RefreshAll(ctx)
if err != nil {
return err
}
failed := 0
for _, result := range results {
attrs := []any{"observation", result.Name, "reason", result.Reason}
if result.WriteErr != nil {
attrs = append(attrs, "writeError", result.WriteErr.Error())
}
if result.Succeeded() {
logger.Info("observation refreshed", attrs...)
continue
}
failed++
logger.Warn("observation not refreshed", append(attrs, "message", result.Message)...)
}
logger.Info("refresh finished", "observations", len(results), "notRefreshed", failed)
if failed > 0 {
return fmt.Errorf("%d of %d observations were not refreshed", failed, len(results))
}
return nil
}
Loading
Loading