Replace file-based route metadata with a Revision informer

未关闭
#75 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
kubernetes, rust

调研方向

Start by tracing how fiber-router currently reads the lampyr-routes ConfigMap and polls its directory, then inspect the related work in #21, #22, and #61. The issue does not name source files or tests, so first locate the router's route source, Revision conversion, readiness acknowledgement, and Fiber pool handling. Done means replacing file polling with an informer-backed cache, preserving local development, readiness, and pool behavior, and covering the listed informer and identity cases.

由索引模型根据 Issue 内容生成。

描述

Problem

fiber-router currently reads one JSON file per Revision from the lampyr-routes ConfigMap volume and reloads the directory every 500 ms. This keeps the router away from the Kubernetes API, but it introduces polling, duplicate file identities, stale files, and failure handling for projected filesystem state.

#21 and #61 harden this path so one invalid file does not block unrelated routes. That is useful during the transition, but it does not remove the underlying synchronization layer. #22 also identifies collisions in the file and pool keys.

Proposed direction

Replace the projected route files with an informer-backed cache of Knative Revisions:

  • watch only the Revision data needed by fiber-router;
  • derive execution mode, timeout, routing state, and identity through shared conversion and validation logic;
  • update or remove one cached Revision without blocking unrelated Revisions;
  • use structured, collision-free namespace and Revision identities;
  • release affected Fiber pools when a Revision is removed or no longer routed; and
  • keep local development behind the same route-source interface without requiring Kubernetes.

The router will need narrowly scoped RBAC to list and watch Revisions. The design must document that security trade-off before implementation.

Readiness

Replace the current ConfigMap version acknowledgement. The Revision reconciler must be able to confirm that the router observed the required state without waiting for Revision Ready and creating a readiness cycle.

Completion criteria

  • The lampyr-routes ConfigMap, volume, and polling loop are removed.
  • Add, update, delete, and routing-state changes update the router cache and Fiber pools correctly.
  • One invalid Revision does not block unrelated Revisions.
  • Readiness confirms the router observed the expected Revision version without a cycle.
  • Local development uses the same route-source abstraction.
  • Tests cover informer restart, relist, deletion, invalid objects, and collision-free identities.

Follow-up to #21, #22, and #61.

主要语言
Rust
星标
3
派生
2
平均合并
3 天 57 分钟
30 天内合并 PR
17

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hyperlight-dev/lampyr 的其他 Issue

查看 hyperlight-dev/lampyr 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。