Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ jobs:
run: sudo apt-get update -qq && sudo apt-get install -y -qq --no-install-recommends ripgrep
- run: ./hack/test-run-standalone-smoke.sh
- run: ./hack/validate-site-dhcp-render.sh
- run: bash hack/dhcp/validate-producer.sh
- run: python3 hack/dhcp/staging-proof-test.py
- run: ./hack/validate-network-boot-inactive.sh
- run: ./hack/validate-doc-links.sh
- run: ./hack/multiplane/test-harness.sh
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ jobs:
platforms: linux/amd64,linux/arm64
secrets: inherit

publish-site-runtime-image:
permissions:
id-token: write
contents: read
packages: write
uses: datum-cloud/actions/.github/workflows/publish-docker.yaml@v1.21.0
with:
image-name: fleet-site-runtime
dockerfile-path: build/site-runtime.Dockerfile
platforms: linux/amd64,linux/arm64
secrets: inherit

# The plugin images are deployed by config/components/{consumer,provider}-ui-plugin
# in the same kustomize bundle.
publish-consumer-ui-plugin-image:
Expand Down
13 changes: 13 additions & 0 deletions build/site-runtime.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM --platform=$BUILDPLATFORM golang:1.26.4-alpine@sha256:3ad57304ad93bbec8548a0437ad9e06a455660655d9af011d58b993f6f615648 AS build
ARG TARGETOS TARGETARCH
WORKDIR /src
COPY go.mod go.sum ./
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-multiplane ./cmd/fleet-multiplane

FROM gcr.io/distroless/static-debian12:nonroot@sha256:afa5c872c891853ca7fcf1f12c3edb23f7eeef36189728842dd51042ff57f7ab
COPY --from=build /out/fleet-multiplane /usr/local/bin/fleet-multiplane
ENV FLEET_SITE_PROVIDER=redfish
ENTRYPOINT ["/usr/local/bin/fleet-multiplane"]
24 changes: 24 additions & 0 deletions config/site/dhcp/producer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Real site producer for an isolated DHCP proof

This opt-in base runs the existing Redfish boot service and authenticated DHCP feed against the actual worker's shared journal and boot evidence. It does not create admissions, worker assignments, IPAM claims, or installer-success evidence. No default overlay includes it.

Use the Go-only `fleet-site-runtime` image built by `build/site-runtime.Dockerfile`, pinned by digest through `FLEET_SITE_IMAGE`. It includes the existing `fleet-multiplane` executable, but no shell, QEMU, libvirt, host sockets, or installer artifacts. This image supports the Redfish Go roles; it is not the privileged local-VM runtime image. Packaging alone does not establish that a worker is enrolled or running.

## Required environment inputs

- An isolated namespace and a disposable emulator identity, never an existing physical server.
- `fleet-site-state`: the **same PVC used by the real worker**, with `journal`, `boot-evidence`, and `artifacts` subdirectories. Provision the test-owned directories for UID/GID 65532 and run the test worker with that identity. Do not change ownership of another site's retained state. The journal mounts read-only in the producer; only the real worker writes admissions. Boot evidence is shared writable state.
- Pinned, verified kernel/initrd/checksum artifacts in `artifacts`, matching the real operation image. The boot service verifies these; no dummy artifact or fabricated completion substitutes for them.
- `fleet-site-runtime` ConfigMap, key `boot-origin`: the approved reachable boot origin. Discover the isolated Service's allocated IP when preparing the runtime; do not choose a site address in this base.
- `fleet-site-redfish-enrollment` ConfigMap, key `enrollment`: the exact real worker enrollment, `dhcp: synced`, and `dhcpInstances: [fleet-dhcp-proof-0]` when using the isolated consumer. Targets must reference only the disposable emulator. A mismatched instance set is not accepted.
- `fleet-site-delivery` ConfigMap, key `methods`: the same real network-boot offer used by the worker. This base deliberately supplies no offer.
- `fleet-site-dhcp-sync` Secret, key `token`; `fleet-site-dhcp-feed-tls` Secret, keys `tls.crt`, `tls.key`, and `ca.crt`. The isolated consumer's Secret names differ: provision matching token and CA contents through environment-managed secret references, never Git. The server certificate must match the feed origin used by the consumer.
- NetworkPolicy admitting only the test consumer to TLS port 8081 and the test client/relay runtime to boot port 8080, with the necessary return paths. No public Service, host networking, or host ports are included.

The source, producer, and consumer remain inactive until these inputs and real worker delivery are reviewed. A listening feed with an empty journal is not an integration proof. An actual worker may power off and reset its target before opening the test window, so accepting a real Device here is unsafe.

## Outcome boundaries

The proof must correlate a real operation with its bound IPAM claim, open worker admission, authenticated feed revision, Kea application, and DHCP packet exchange. Test unknown-client denial, acquisition, renewal, and a fresh attempt after withdrawal. Removing a reservation does not revoke an existing lease. Deadline-induced withdrawal does not establish completed installation, settled custody, or permission to delete the claim: uncertain worker effects retain custody and address ownership until recovery is resolved.

An isolated cluster pass does not validate any real site's relay, WAN route, or physical client path. Nothing in this preparation changes those systems.
81 changes: 81 additions & 0 deletions config/site/dhcp/producer/boot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: v1
kind: Service
metadata:
name: fleet-site-boot
spec:
selector:
app.kubernetes.io/name: fleet-site-boot
ports:
- name: http
port: 8080
targetPort: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fleet-site-boot
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: fleet-site-boot
template:
metadata:
labels:
app.kubernetes.io/name: fleet-site-boot
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: boot
image: "${FLEET_SITE_IMAGE}"
command: [fleet-multiplane, boot-service]
env:
- name: FLEET_SITE_PROVIDER
value: redfish
- name: FLEET_BOOT_EVIDENCE
value: /var/lib/fleet-boot
- name: FLEET_BOOT_ORIGIN
valueFrom:
configMapKeyRef:
name: fleet-site-runtime
key: boot-origin
ports:
- name: http
containerPort: 8080
readinessProbe:
tcpSocket:
port: http
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
resources:
requests: {cpu: 20m, memory: 32Mi}
limits: {memory: 128Mi}
volumeMounts:
- name: state
mountPath: /var/lib/fleet-local
subPath: journal
readOnly: true
- name: state
mountPath: /var/lib/fleet-boot
subPath: boot-evidence
- name: state
mountPath: /opt/fleet-local/artifacts
subPath: artifacts
readOnly: true
volumes:
- name: state
persistentVolumeClaim:
claimName: fleet-site-state
31 changes: 31 additions & 0 deletions config/site/dhcp/producer/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: fleet-site
resources:
- boot.yaml
components:
- ../feed
patches:
- target:
kind: Deployment
name: fleet-site-boot
patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: fleet-site-boot
spec:
template:
spec:
containers:
- name: dhcp-feed
securityContext:
runAsUser: 65532
runAsNonRoot: true
volumes:
- name: dhcp-sync-token
secret:
defaultMode: 0440
- name: dhcp-feed-tls
secret:
defaultMode: 0440
Loading
Loading