Skip to content
Open
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
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ updates:
- /helper
- /providers/azure/eventgrid
- /providers/azure/node-setup
- /upstream
schedule:
interval: monthly
cooldown:
Expand Down
35 changes: 3 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,8 @@ jobs:
- name: Prepare the helper image context
run: just helper::prepare-image

# Builds what the cluster suites install in place of the published
# controller inputs: the stock fiberd, helper and fiberd-k8s-controller
# images and the controller's manifest, from upstream/pins.env's commits
# and this checkout's helper, once for every suite.
# Pulls the signed upstream images and builds this checkout's helper.
# Each cluster suite installs the same pinned controller inputs.
cluster-inputs:
runs-on: ubuntu-latest
timeout-minutes: 45
Expand Down Expand Up @@ -204,37 +202,10 @@ jobs:
with:
name: lampyr-ci-cache

- name: Check out the pinned fiberd
run: just upstream::prepare-fiberd-image

# The cluster inputs build fiberd as go.mod's version, which fiberd
# -version prints, so the cache is warmed with it too.
- name: Read the fiberd version
id: fiberd-version
# A failure inside $(...) as an argument would not stop the step.
run: |
version=$(just upstream::fiberd-version)
[[ -n $version ]] || { echo "just upstream::fiberd-version printed nothing" >&2; exit 1; }
printf 'version=%s\n' "$version" >>"$GITHUB_OUTPUT"

# fiberd's image builds criu and its zygote library, so keep every
# stage; the pin changes rarely.
- name: Warm the stock fiberd build cache
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
builder: lampyr-ci-cache
context: build/upstream/fiberd
file: build/upstream/fiberd/docker/fiberd/Dockerfile
target: fiberd
build-args: VERSION=${{ steps.fiberd-version.outputs.version }}
platforms: linux/amd64
provenance: false
cache-from: type=gha,scope=ci-upstream-fiberd,timeout=2m
cache-to: type=gha,mode=max,scope=ci-upstream-fiberd,ignore-error=true,timeout=2m

- name: Build the cluster suites' controller inputs
env:
BUILDX_BUILDER: lampyr-ci-cache
GH_TOKEN: ${{ github.token }}
run: just upstream::cluster-inputs build/cluster-inputs

- name: Upload the cluster suites' controller inputs
Expand Down
55 changes: 7 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ jobs:
# ly cluster install from a release needs none of them, and
# zygoteRegistries defaults to the Kind or k3d local registry.
- name: Write the default controller inputs
env:
GH_TOKEN: ${{ github.token }}
run: |
image() {
local digest
Expand All @@ -400,8 +402,9 @@ jobs:
printf '%s/%s@%s\n' "$IMAGE_PREFIX" "$1" "$digest"
}
# A failure inside $(...) as an argument would not stop the step.
controller=$(image fiberd-k8s-controller)
grant=$(image upstream-fiberd)
. upstream/pins.env
controller=$CONTROLLER_IMAGE
grant=$FIBERD_IMAGE
helper=$(image hluk-helper)
just upstream::controller-inputs "$controller" "$grant" "$helper"

Expand Down Expand Up @@ -579,24 +582,6 @@ jobs:
build_args: BINARY=eventgrid-adapter
title: Lampyr Event Grid adapter
description: Lampyr Event Grid adapter
# Built from the upstream commits upstream/pins.env pins until
# fiberd and fiberd-k8s-controller publish images of their own.
- image: upstream-fiberd
prepare: upstream::prepare-fiberd-image
context: build/upstream/fiberd
dockerfile: build/upstream/fiberd/docker/fiberd/Dockerfile
target: fiberd
build_args: ""
title: fiberd
description: Stock fiberd, which grant Pods run, from the commit upstream/pins.env pins
- image: fiberd-k8s-controller
prepare: upstream::prepare-controller-image
context: .
dockerfile: upstream/controller.Dockerfile
target: ""
build_args: ""
title: fiberd-k8s-controller
description: fiberd-k8s-controller from the commit upstream/pins.env pins
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -628,22 +613,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# The upstream images' descriptions name the repository and commit
# pins.env gives, so an image says which source it was built from.
- name: Read the upstream source
id: upstream
if: matrix.image == 'upstream-fiberd' || matrix.image == 'fiberd-k8s-controller'
env:
IMAGE: ${{ matrix.image }}
run: |
. upstream/pins.env
if [[ $IMAGE == upstream-fiberd ]]; then
description="Stock fiberd, which grant Pods run, from $FIBERD_REPOSITORY@$FIBERD_COMMIT"
else
description="fiberd-k8s-controller from $CONTROLLER_REPOSITORY@$CONTROLLER_COMMIT"
fi
printf 'description=%s\n' "$description" >>"$GITHUB_OUTPUT"

- name: Extract image metadata
id: meta
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
Expand All @@ -652,29 +621,19 @@ jobs:
tags: type=raw,value=${{ needs.version.outputs.image-tag }}
labels: |
org.opencontainers.image.title=${{ matrix.title }}
org.opencontainers.image.description=${{ steps.upstream.outputs.description || matrix.description }}
org.opencontainers.image.description=${{ matrix.description }}
org.opencontainers.image.source=https://github.com/hyperlight-dev/lampyr
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ needs.version.outputs.image-tag }}

# fiberd -version prints the version the image is built as.
- name: Read the fiberd version
id: fiberd-version
if: matrix.image == 'upstream-fiberd'
# A failure inside $(...) as an argument would not stop the step.
run: |
version=$(just upstream::fiberd-version)
[[ -n $version ]] || { echo "just upstream::fiberd-version printed nothing" >&2; exit 1; }
printf 'build-args=VERSION=%s\n' "$version" >>"$GITHUB_OUTPUT"

- name: Build and push image
id: build
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
target: ${{ matrix.target }}
build-args: ${{ steps.fiberd-version.outputs.build-args || matrix.build_args }}
build-args: ${{ matrix.build_args }}
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Prerelease] - Unreleased

### Changed

- Releases use the signed, digest-pinned Azure/fiberd v0.4.0 and Azure/fiberd-k8s-controller v0.1.0 images. Lampyr no longer builds or publishes copies of these images. Platform archives keep the matching controller install manifest and template tools.

## [0.1.1] - 2026-11-07

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ build-dev-supervisor:
build-eventgrid: azure::build-eventgrid

# Prepare every Linux/amd64 preview image context without publishing it.
prepare-preview-images: prepare-fiberd-image prepare-fiber-router-image helper::prepare-image upstream::prepare-fiberd-image upstream::prepare-controller-image azure::prepare-preview-images
prepare-preview-images: prepare-fiberd-image prepare-fiber-router-image helper::prepare-image azure::prepare-preview-images
python3 "{{repo-root}}/scripts/check_preview_images.py" --root "{{repo-root}}" --require-binaries

# Package all preview release assets, including the verified installer entrypoint.
Expand Down
15 changes: 10 additions & 5 deletions cli/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,9 @@ fn install_controller(
"fiberd-k8s-controller",
"180s",
)?;
// The policy admits the fiberd and helper images and the templates only
// from listed repositories, each in a list of its own, and the
// hyperlight runtime runs privileged, which it allows only in a listed
// namespace.
// The runtime ceiling admits only Hyperlight. No runtime is allowed by
// default; only the tenant namespace gets the Hyperlight exception.
// The pinned controller does not allow privileged grant Pods.
let policy = json!({
"apiVersion": "fiberd.io/v1alpha1", "kind": "GrantPolicy",
"metadata": { "name": "default" },
Expand All @@ -876,10 +875,16 @@ fn install_controller(
"helperImages": [image_repository("helperImage", options.helper_image)?],
"registries": options.zygote_registries,
"runtimes": ["hyperlight"],
"privilegedNamespaces": ["default"],
"defaultRuntimes": [],
}
});
apply_recorded_manifest(kube, options.installation_id, &policy, inventory)?;
kube.patch(
"default",
"namespace",
"default",
&json!({ "metadata": { "labels": { "runtimes.fiberd.io/hyperlight": "true" } } }),
)?;
let tenant = options.root.join("k8s/fiberd-tenant.yaml");
apply_recorded_source(
kube,
Expand Down
4 changes: 4 additions & 0 deletions docs/cli/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ GrantPolicy lists their repositories. `ly cluster install` checks all three
before the provider creates anything. A reinstall applies cert-manager only to
a cluster without it, so Lampyr never upgrades a cert-manager it installed.

Lampyr adds `runtimes.fiberd.io/hyperlight=true` only to namespace `default`.
The GrantPolicy permits only Hyperlight. It allows no runtime in a namespace
without a runtime label.

## Fiberd templates

`ly deploy` pushes every Revision's fiberd template to one repository per
Expand Down
45 changes: 21 additions & 24 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ the VM contracts. Both run in CI and through `just test`.
The cluster suites (`just test-kind-integration` and its prebuilt variants,
`just test-k3d-integration`, `just test-existing-kind-integration`,
`just test-knative-portability` and `just test-azure-eventgrid-integration`)
install fiberd-k8s-controller, which has no
release yet. They read its installation inputs from the environment and stop
install fiberd-k8s-controller. They read its installation inputs from the environment and stop
before creating anything when one is missing:

| Variable | Value |
Expand All @@ -151,9 +150,9 @@ just upstream::cluster-inputs build/cluster-inputs
LAMPYR_CLUSTER_INPUTS="$PWD/build/cluster-inputs" just test-existing-kind-integration
```

The recipe builds the stock fiberd image and fiberd-k8s-controller from the
commits `upstream/pins.env` pins, and the helper, its image, `zygotectl` and
`grant-issuer` from this checkout and that fiberd. Its buildx builder must
The recipe verifies and pulls the upstream image digests in
`upstream/pins.env`. It builds the helper and its image from this checkout,
and `zygotectl` and `grant-issuer` from the pinned fiberd source. Its buildx builder must
export OCI layouts, as a `docker-container` one does. A suite pushes the
fiberd and helper images to its own registry, keeping their digests, and has
its provider load the controller image, which the manifest names by a
Expand Down Expand Up @@ -209,13 +208,14 @@ all attested against `refs/tags/vX.Y.Z`. Source keeps `:preview` image tags;
the release build stamps `X.Y.Z` into the CLI's default images and the packaged
platform manifests. Install it with `scripts/install-ly.sh vX.Y.Z`.

fiberd and fiberd-k8s-controller publish no images or install manifest yet,
so every preview and versioned release builds them from the commits
`upstream/pins.env` pins, as `upstream-fiberd` and `fiberd-k8s-controller`.
Packaging then writes `build/fiberd-k8s-controller.yaml`, the controller's
`config/default` running its published image by digest, and
`build/controller-inputs.json`, which names that manifest and the published
`upstream-fiberd` and `hluk-helper` digests, into both platform archives
Releases use the signed upstream images for fiberd v0.4.0, with its Hyperlight
backend, and fiberd-k8s-controller v0.1.0. `upstream/pins.env` pins their image
digests and source commits. `just upstream::verify-images` verifies each image's
provenance against its upstream release workflow and source commit.
Packaging writes `build/fiberd-k8s-controller.yaml`, the controller release's
`config/default` running its upstream image by digest, and
`build/controller-inputs.json`, which names that manifest, the upstream fiberd
digest and the published `hluk-helper` digest, into both platform archives
(`just upstream::controller-inputs`). `ly cluster install` takes
`controllerManifest`, `grantImage` and `helperImage` from them when an install
is not given them, and `zygoteRegistries` defaults to the Kind or k3d
Expand All @@ -227,8 +227,8 @@ are made, and
`build/zygotectl` and `build/grant-issuer`, which run on the user's machine,
built from the pinned fiberd for each archive's own target into
`build/template-tools/TARGET` (`just upstream::template-tools`). To move
to new upstream commits, change `upstream/pins.env`, and `go.mod`'s
`github.com/Azure/fiberd` with `FIBERD_COMMIT`.
to new upstream releases, verify their image provenance and Hyperlight support,
then update `upstream/pins.env` and `go.mod`'s `github.com/Azure/fiberd` together.

## Preview images

Expand All @@ -241,8 +241,6 @@ The workflow publishes these canonical GHCR image tags, where
- `ghcr.io/hyperlight-dev/lampyr/azure-node-setup:preview-<full-release-commit>`
- `ghcr.io/hyperlight-dev/lampyr/eventgrid-controller:preview-<full-release-commit>`
- `ghcr.io/hyperlight-dev/lampyr/eventgrid-adapter:preview-<full-release-commit>`
- `ghcr.io/hyperlight-dev/lampyr/upstream-fiberd:preview-<full-release-commit>`
- `ghcr.io/hyperlight-dev/lampyr/fiberd-k8s-controller:preview-<full-release-commit>`

The workflow also updates `:preview` convenience aliases. Those aliases move
and are not the consistency boundary for a release, so do not use them for
Expand All @@ -256,9 +254,8 @@ checksummed and attested release asset; it similarly checks strict SHA-256 files
and exact-commit GitHub attestations for the CLI and platform archives before
installation.

To consume the images from another registry, authenticate `gh` for
attestations, authenticate Docker to the destination registry, and use Docker
Buildx:
To consume the images from another registry, install `jq`, authenticate `gh`
for attestations, and authenticate Docker to the destination registry. Use Docker Buildx:

```bash
gh auth status --hostname github.com
Expand All @@ -270,12 +267,12 @@ docker login REGISTRY
just preview-mirror-images destination=REGISTRY/lampyr
```

The mirror resolves the commit behind `preview-release`, selects all eight
The mirror resolves the commit behind `preview-release`, selects all six
canonical `preview-<full-release-commit>` tags automatically, and verifies
every source digest's GitHub attestation before copying it. Those include the
platform's default controller inputs, `upstream-fiberd`, `fiberd-k8s-controller`
and `hluk-helper`. It also downloads the preview's Linux platform archive,
verifies its attestation, and checks that every image its fiberd-k8s-controller
every Lampyr source digest's GitHub attestation. It reads the upstream fiberd
and controller digests from the verified Linux platform archive and verifies
their attestations against the Azure release workflows before copying them.
It checks that every image its fiberd-k8s-controller
manifest pulls is one of the verified images. It then writes destination digest
references to the Kind provider config at `build/preview-kind.yaml` and the
Azure image-settings fragment at `build/preview-azure.yaml`, and the manifest,
Expand Down
4 changes: 2 additions & 2 deletions docs/designs/knative-fiber-serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ Lampyr runs a Revision only from a fiberd template sealed to the cluster's
fleet key, so the proof first deploys the service with `ly deploy` to build,
seal and push one, deletes it, and gives the shared Knative Service that
template's `lampyr.dev/fiberd-template`, which stock Knative ignores.
fiberd-k8s-controller has no release yet, so the proof, like every cluster
suite, needs its installation inputs: `LAMPYR_CONTROLLER_MANIFEST`,
The proof, like every cluster suite, needs its installation inputs:
`LAMPYR_CONTROLLER_MANIFEST`,
`LAMPYR_GRANT_IMAGE` and `LAMPYR_HELPER_IMAGE`, and, unless `build/zygotectl`
and `build/grant-issuer` exist, `LAMPYR_FIBERD_SRC` naming the fiberd checkout
that builds them. In place of all four, `LAMPYR_CLUSTER_INPUTS` may name the
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.26.7
require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.23.3
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.15.0
github.com/Azure/fiberd v0.2.1-0.20261106172642-549f6168ca09
github.com/Azure/fiberd v0.4.0
github.com/cert-manager/cert-manager v1.16.3
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674
github.com/prometheus/client_golang v1.25.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.4.0 h1:xFaZZ+IubdftrDH
github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.4.0/go.mod h1:mCBhUhlMjLLJKr5aqw2TNS/VqJOie8MzWq3DAMJeKso=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.13.0 h1:Terj1CMW4+NY5CpWjSRkqLoxh2DkYDdv/FH2z0897Uc=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.13.0/go.mod h1:7Ut2Qw9vcwpLW5Q4MBy43uSxXS7tK2yjs94OJ6j5thE=
github.com/Azure/fiberd v0.2.1-0.20261106172642-549f6168ca09 h1:SPvsfxxHldgfGO1RyU3CkPujdPoQPdbSG9KRZemaZ84=
github.com/Azure/fiberd v0.2.1-0.20261106172642-549f6168ca09/go.mod h1:hvIM6EAUZaduTf1oUiK5iosUiqT2k6dmpjXH17ectog=
github.com/Azure/fiberd v0.4.0 h1:oVgSYygZJMnsdDhQPehA6xxsUm4u0T379zVLGTz8Zf8=
github.com/Azure/fiberd v0.4.0/go.mod h1:hvIM6EAUZaduTf1oUiK5iosUiqT2k6dmpjXH17ectog=
github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM=
github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE=
github.com/AzureAD/microsoft-authentication-library-for-go v1.10.1 h1:0O6j18nQDoIff6/mtosT5LNU2WehEwp+LqfX6699oqY=
Expand Down
7 changes: 0 additions & 7 deletions scripts/check_preview_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ class Image:
(),
("build/hluk-helper",),
),
Image(
"fiberd-k8s-controller",
".",
"upstream/controller.Dockerfile",
(),
("build/fiberd-k8s-controller",),
),
Image(
"azure-node-setup",
"providers/azure/node-setup",
Expand Down
6 changes: 3 additions & 3 deletions scripts/fiberd-controller-inputs.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

# Shared by the cluster integration suites. fiberd-k8s-controller has no
# release yet, so its manifest, the stock fiberd image grant Pods run and
# Lampyr's helper image are installation inputs, as for ly cluster install:
# Shared by the cluster integration suites. The controller manifest, the
# upstream fiberd image and Lampyr's helper image are installation inputs,
# as for ly cluster install:
#
# LAMPYR_CONTROLLER_MANIFEST the controller's install manifest, a path or
# an https:// URL
Expand Down
Loading
Loading