Skip to content

feat(fabric-api): Package the Looking Glass rollout as Components - #1123

Merged
privateip merged 1 commit into
feat/lg-backend-telemetryfrom
feat/lg-backend-packaging
Oct 27, 2026
Merged

privateip merged 1 commit into
feat/lg-backend-telemetryfrom
feat/lg-backend-packaging

Conversation

@privateip

Copy link
Copy Markdown
Contributor

Summary

Turning on aggregate probe budgets and the Looking Glass service meant hand-editing manifests in a strict order, and nothing stopped an overlay from enabling the service before every node charged direct operator probes.

Four opt-in Kustomize Components package the rollout, and each fails its build without the one it needs. The service switch ships disabled and survives a Flux reconcile once an operator flips it.

The operator docs cover the switch and running work, the limits and their failure bounds, diagnosis from the new metrics, and upgrade and rollback. Third of three stacked changes, on top of #1122. It waits for #1111 and #1112 and rebases onto them.

Test plan

  • Each valid Component composition renders, and each out-of-order one fails, in CI
  • Applied in order on a cell, the gateway and sidecars start with the switch off and requests refused as disabled

Fixes #1047

@privateip privateip self-assigned this Oct 26, 2026
@privateip
privateip force-pushed the feat/lg-backend-packaging branch from 908b913 to 637966b Compare October 26, 2026 20:41
@privateip
privateip force-pushed the feat/lg-backend-packaging branch from 637966b to ba5cc3b Compare October 26, 2026 20:49
@privateip privateip changed the title feat(fabric-api): Package the Looking Glass rollout as Kustomize Components feat(fabric-api): Package the Looking Glass rollout as Components Oct 26, 2026
@privateip
privateip added this pull request to stack #1125 October 26, 2026 21:10
@privateip
privateip requested a review from scotwells October 26, 2026 21:58
@privateip
privateip marked this pull request as ready for review October 27, 2026 01:55
@privateip
privateip requested a review from a team as a code owner October 27, 2026 01:55
scotwells
scotwells previously approved these changes Oct 27, 2026
Turning on aggregate probe budgets and the Looking Glass service meant hand-editing the fabric-router and gateway manifests in the order the contract requires, and nothing stopped an overlay from enabling the service before every node charged direct operator probes.

Four opt-in Components package that rollout. fabric-api-permits adds --probe-permits to the fabric-router sidecar, mounts the ServiceAccount token into it and grants get on the gateway's Lease alone; fabric-api-require-permits adds --require-probe-permits and the gateway Service address. aggregate-budgets adds --aggregate-budgets to the gateway, and service adds --service-config-map, the looking-glass service identity, the fabric-api-service ConfigMap shipped disabled and a Role that can get that ConfigMap alone. Each fails its build without the Component it needs. The ConfigMap carries Flux's ssa IfNotPresent annotation, so an operator's kubectl stop survives reconciliation.

task test:manifests renders each valid composition under tests/manifests and checks that each out-of-order one fails, and a new CI job runs it.

configuration.md documents the limit flags with tuning guidance and the contract's failure bounds, and the clock check. operations.md documents the Components and the enabling order, the switch and what happens to running work, diagnosis from the new metrics and alerts, and the upgrade and rollback order. The Looking Glass service design, the fabric-api architecture, deployment and security pages and the alert catalog describe the same.

Fixes #1047
ecv
ecv previously approved these changes Oct 27, 2026

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

Rendered all five fixtures at 6c138d6 with kustomize v5.8.3: the two valid compositions build, the three invalid ones fail for the intended reason. Components are opt-in and RBAC is narrow.

  • RBAC for the switch is supplied and tight: config/fabric-api/components/service/rbac.yaml is a namespaced Role with get on configmaps limited to resourceNames: [fabric-api-service], bound to the fabric-api-gateway ServiceAccount. That matches the code, which polls through mgr.GetAPIReader() (uncached get, no list/watch).
  • Router permits RBAC is equally narrow: fabric-api-permits/rbac.yaml gives fabric-router get on the single Lease fabric-api-gateway in galactic-system. No Secrets or ConfigMaps access, no cluster-wide rules.
  • kustomize.toolkit.fluxcd.io/ssa: IfNotPresent on fabric-api-service is the correct Flux mechanism: Flux creates the object once, skips server-side apply while it exists, so an operator's kubectl edit survives reconciles. It renders onto the ConfigMap as written.
  • Flip side: Git can never turn the service off or back on once the object exists, and deleting the ConfigMap from Git only prunes it, after which it is recreated as disabled. The kustomization header explains the "no reconcile re-enables after an emergency stop" half but not that a Git revert is not a way to disable; say so in docs/fabric-api/configuration.md.
  • Invalid cases fail for the right reasons: permits-without-sidecar and require-without-permits die on the no-op patch with no matches for Id ..., service-without-budgets dies on the test op (Unable to access invalid index: 1). task test:manifests inverts the exit status for tests/manifests/invalid/*, so a build that unexpectedly succeeds prints FAIL and exits 1. CI runs it in the new manifests job.
  • Opt-in confirmed: no kustomization in the repo lists the new Components (the only match in config/fabric-api/kustomization.yaml is a comment), so merging changes no deployment.
  • Rollout hazards are documented in the Component headers: permits and require-permits change the DaemonSet pod template and restart FRR on every node, so roll as a routing change.

Follow-ups:

  • The invalid-case loop treats any build failure as success, so a typo in a fixture path or a base rename would keep it green. Grep the error text (no matches for Id / invalid index) in Taskfile.yaml test:manifests.
  • service/deployment-patch.yaml tests args/1 == --aggregate-budgets, which depends on base args being exactly [gateway] plus the budgets flag; a new base arg at index 1 would make the guard fail wrongly or pass wrongly. Acceptable now, fragile later.
  • Flip side of the IfNotPresent annotation deserves a runbook line: the emergency stop is kubectl only.

scotwells
scotwells previously approved these changes Oct 27, 2026
@privateip
privateip dismissed stale reviews from scotwells and ecv October 27, 2026 12:12

The merge-base changed after approval.

@privateip
privateip merged commit e803cd6 into main Oct 27, 2026
30 of 31 checks passed
@privateip
privateip deleted the feat/lg-backend-packaging branch October 27, 2026 12:12
@privateip privateip mentioned this pull request Oct 29, 2026
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deliver backend configuration, diagnostics, and operational controls

3 participants