Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d2f89fb
feat(allocation): Allocate, install and release on Device custody
scotwells Nov 25, 2026
925b967
feat(standalone): Run the smoke test on Device custody
scotwells Nov 25, 2026
96763d2
feat(staging): Allocate synthetic staging claims on Device custody
scotwells Nov 25, 2026
8b2d9bc
feat(site): Carry assignments through Karmada and run local VM work
scotwells Nov 25, 2026
f9fab69
feat(multiplane): Run the multi-plane acceptance phases on custody
scotwells Nov 25, 2026
ea68aed
test(multiplane): Enroll per-Device credentials and run the coordinat…
scotwells Nov 25, 2026
b7a2ee9
refactor: Delete the Secret-backed coordinator and its executors
scotwells Nov 25, 2026
c0ea13b
test(multiplane): Read custody and the site store in the acceptance
scotwells Nov 25, 2026
56460a7
docs: Record the custody cutover
scotwells Nov 25, 2026
2f09be2
test(multiplane): Count an answered install handoff by its operation
scotwells Nov 25, 2026
dcc7da2
chore: Ignore command binaries built at the repository root
scotwells Nov 25, 2026
03744be
fix(allocation): Release a waiting Machine's quota claim
scotwells Nov 25, 2026
8a99b76
fix(manager): Project power when custody changes
scotwells Nov 25, 2026
4f982af
fix: Close a failed boot, test the site API, record residuals
scotwells Nov 25, 2026
5f2a3bd
fix(multiplane): Release a Machine without deleting it
scotwells Nov 25, 2026
254bacc
fix(site): Let each worker get only its Device's credential
scotwells Nov 25, 2026
9dba598
fix(multiplane): Probe closed boots from the store and origin alone
scotwells Nov 25, 2026
e20d1ec
fix(multiplane): Serve Redfish boots without the worker's configuration
scotwells Nov 25, 2026
b78169d
test(multiplane): Expect RBAC to refuse a credential list Role
scotwells Nov 25, 2026
e3098c7
fix(multiplane): Seed only target A as a Redfish Device
scotwells Nov 25, 2026
336a266
fix(multiplane): Carry the credential into injected fault handoffs
scotwells Nov 25, 2026
79c496a
test(standalone): Expect the inventory and custody CRDs in preflight
scotwells Nov 25, 2026
1401183
refactor: Keep object UIDs out of every spec
scotwells Nov 25, 2026
75cae50
refactor: Name consumers and publishers with typed references
scotwells Nov 26, 2026
e60ad9f
fix(site): Derive each worker's credential from its own assignment
scotwells Nov 26, 2026
58a8232
fix(site): Grant credentials only to a handoff that matches its Device
scotwells Nov 26, 2026
7c01eba
fix(staging): Sign the coordinator and release controller in with cli…
scotwells Nov 26, 2026
d005890
fix(custody): Identify service principals by username
scotwells Nov 27, 2026
71240f4
fix(standalone): Admit a creator without a UID in the creator policy
scotwells Nov 27, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- 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
- run: shellcheck -S warning hack/multiplane/*.sh hack/local-vm/start-libvirt hack/local-vm/site-runtime
standalone-smoke:
runs-on: ubuntu-latest
timeout-minutes: 35
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ config/multiplane/flux/gotk-components.yaml

# Locally built binaries
/fleet-multiplane
/fleet-local-vm
/fleet-manager
/fleet-registration
/fleet-simulator
/fleet-standalone-smoke
8 changes: 0 additions & 8 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ tasks:
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
230 changes: 0 additions & 230 deletions cmd/fleet-local-vm/main.go

This file was deleted.

109 changes: 109 additions & 0 deletions cmd/fleet-manager/clientcert_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
package main

import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"math/big"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"testing"
"time"

"k8s.io/client-go/rest"
)

// clientCertDir writes a cert-manager style Secret directory, tls.crt and
// tls.key, holding a client certificate for commonName signed by ca.
func clientCertDir(t *testing.T, ca *x509.Certificate, caKey *ecdsa.PrivateKey, commonName string) string {
t.Helper()
key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
if err != nil {
t.Fatal(err)
}
template := &x509.Certificate{SerialNumber: big.NewInt(2), Subject: pkix.Name{CommonName: commonName},
NotBefore: time.Now().Add(-time.Hour), NotAfter: time.Now().Add(time.Hour), ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}}
der, err := x509.CreateCertificate(rand.Reader, template, ca, &key.PublicKey, caKey)
if err != nil {
t.Fatal(err)
}
keyDER, err := x509.MarshalECPrivateKey(key)
if err != nil {
t.Fatal(err)
}
dir := t.TempDir()
for name, block := range map[string]*pem.Block{"tls.crt": {Type: "CERTIFICATE", Bytes: der}, "tls.key": {Type: "EC PRIVATE KEY", Bytes: keyDER}} {
if err := os.WriteFile(filepath.Join(dir, name), pem.EncodeToMemory(block), 0o600); err != nil {
t.Fatal(err)
}
}
return dir
}

// TestEachComponentAuthenticatesToMiloWithItsOwnClientCertificate builds
// the coordinator's connection from the manager's: the same endpoint and
// server CA, but only the coordinator's client certificate, and none of the
// manager's credentials.
func TestEachComponentAuthenticatesToMiloWithItsOwnClientCertificate(t *testing.T) {
caKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
if err != nil {
t.Fatal(err)
}
caTemplate := &x509.Certificate{SerialNumber: big.NewInt(1), Subject: pkix.Name{CommonName: "synthetic-client-ca"}, IsCA: true, BasicConstraintsValid: true,
KeyUsage: x509.KeyUsageCertSign, NotBefore: time.Now().Add(-time.Hour), NotAfter: time.Now().Add(time.Hour)}
caDER, err := x509.CreateCertificate(rand.Reader, caTemplate, caTemplate, &caKey.PublicKey, caKey)
if err != nil {
t.Fatal(err)
}
ca, err := x509.ParseCertificate(caDER)
if err != nil {
t.Fatal(err)
}
pool := x509.NewCertPool()
pool.AddCert(ca)
type seen struct {
commonName string
authorization string
}
requests := make(chan seen, 1)
server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
got := seen{authorization: r.Header.Get("Authorization")}
if len(r.TLS.PeerCertificates) == 1 {
got.commonName = r.TLS.PeerCertificates[0].Subject.CommonName
}
requests <- got
}))
server.TLS = &tls.Config{ClientAuth: tls.RequireAndVerifyClientCert, ClientCAs: pool}
server.StartTLS()
defer server.Close()
serverCA := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: server.Certificate().Raw})

manager := clientCertDir(t, ca, caKey, "fleet-manager")
provider := &rest.Config{Host: server.URL, BearerToken: "manager-token", TLSClientConfig: rest.TLSClientConfig{
CAData: serverCA, CertFile: filepath.Join(manager, "tls.crt"), KeyFile: filepath.Join(manager, "tls.key")}}
config, err := withClientCert(provider, clientCertDir(t, ca, caKey, "custody-coordinator"))
if err != nil {
t.Fatal(err)
}
client, err := rest.HTTPClientFor(config)
if err != nil {
t.Fatal(err)
}
response, err := client.Get(config.Host + "/readyz")
if err != nil {
t.Fatal(err)
}
response.Body.Close()
if got := <-requests; got.commonName != "custody-coordinator" || got.authorization != "" {
t.Fatalf("Milo saw client certificate %q and authorization %q, want only the coordinator's certificate", got.commonName, got.authorization)
}
if _, err := withClientCert(provider, t.TempDir()); err == nil {
t.Fatal("a directory without a client certificate was accepted")
}
}
Loading
Loading