Commit Graph

3 Commits

Author SHA1 Message Date
unkinben 07595f0377 fix: rewrite helm index.yaml URLs post-parse to handle relative URLs
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
Raw byte replacement in _merge_helm_indexes only worked when the upstream
index contained absolute URLs matching base_url. Upstreams like Rancher use
relative URLs (e.g. rancher-2.13.1.tgz), which were left unrewritten,
causing Helm to construct a 404-producing URL against the virtual repo.

Now parses YAML first, then rewrites each entry's urls list:
- relative URL → prepend {proxy_base}/api/v1/remote/{member_name}/
- absolute URL matching base_url → replace prefix with proxy remote path
2026-05-01 23:34:53 +10:00
unkinben 1656664dfa refactor: split config into remotes/virtuals/locals sections (#31)
ci/woodpecker/tag/docker Pipeline was successful
Repository types now live under dedicated top-level keys instead of a
shared remotes: block distinguished by a type field:

  remotes:   caching proxy remotes (no type field needed)
  virtuals:  virtual merged-index repositories
  locals:    local upload repositories

Routes for local repos move from /api/v1/remote/ to /api/v1/local/.
config.py gains get_virtual_config() and get_local_config() lookups.
Root endpoint now reports all three sections. Drop root conf.d/ (was
an exact duplicate of examples/conf.d-method/).

Reviewed-on: #31
2026-04-30 23:50:20 +10:00
unkinben c7baae8d0d feat: add virtual repository support for unified index merging (#30)
Adds a new virtual repo type that merges indexes from multiple member remotes
of the same package type. Currently supports helm (index.yaml merge with URL
rewriting). Member fetches run in parallel; merged index is Redis-cached at
min(mutable_ttl) across members.

Reviewed-on: #30
2026-04-29 23:01:14 +10:00