helmhttp

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package helmhttp serves classic Helm repositories under /api/helm/: at /artifactory/api/helm/{repoKey}/, through the router kit (decision 0032), the root index.yaml, the charts and their provenance files that helm repo add, helm repo update and helm pull read. A chart is published through the item routes' deploy, which the Helm format indexes as it indexes any write, so the protocol only reads (decision 0039).

Role

artifacts module, ecosystem layer: the native classic Helm repository protocol of the Helm slice. It is named helmhttp so that it does not shadow net/http. Outside tests, only its own http subtree, the module's http adapters and app may import it (decision 0044, dependency rule 9).

Inputs

  • Driving: the server, which mounts Protocol through the router kit (pkgroute) for repositories of package type helm: GET and HEAD of the root index.yaml and of any other path. The reindex operations under the same prefix are the server's generated operations, which Protocol reserves.
  • Driven: the router kit (pkgroute.Kit), which resolves the repository and the caller, checks permissions, serves items and writes errors; the format package (artifacts/ecosystem/helm), whose derived index and chart rules the answers are built from; and the remote source service (Options.RemoteSources), which fetches the upstream index.yaml, charts and provenance files into the remote cache.
  • Settings: Options.Format, the server's Helm options, which choose relative or absolute chart URLs.

Outputs

  • Protocol and Options: the routes, the source of each repository class and the Artifactory error profile.
  • Answers: for a local or federated repository, the derived index.yaml once the work its writes queued has run, with the stored relative chart URLs or, when Settings turn them off, absolute ones against the request's base URL, and every other file as the item routes serve it; for a remote repository, the upstream index with its chart URLs rewritten to this repository and its other fields kept, and charts and provenance files checked against it before they are cached or served.

Invariants

  • The remote index.yaml is cached as the upstream sent it; an answer rewrites only its chart locations, lists only the charts the caller may read, and keeps signed chart and provenance bytes unchanged.
  • A provenance file is served only while it matches the current index, offline reads included.
  • The download policy (#1251) refuses index.yaml, local or remote, at its own path, where 7.x stores or caches it: a blacked-out repository or a pattern on index.yaml answers 404 naming it, after Read permission. A chart the patterns reject stays listed, and only its download and a provenance file the patterns reject are refused, each at its own path. A remote chart download's index lookup is refused by the blackout alone, naming the requested file.
  • Statuses, error texts and the remote cache variants (helm-chart-v2, helm-provenance-v1) stay byte-identical.

References

Status

Implemented P8, with remote retrieval in P9. Moved here in P9d.

Testing

  • helm_test.go: repo add and pull, cold index reads, refusals and index failures through a server.
  • remote_test.go, remote_validation_test.go, remote_provenance_test.go and remote_review_regression_test.go: remote indexes, charts and provenance, URL policy, admission limits, offline reads and disclosure.
  • download_policy_test.go: the download policy at the local and remote index.yaml, charts and provenance files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Protocol

func Protocol(o Options) pkgroute.Protocol

Protocol serves classic Helm metadata, charts and provenance. Local publishing uses the item API; remote repositories expose only reads.

Types

type Options

type Options struct {
	Format        helmfmt.Settings
	RemoteSources *source.Service
}

Options combines local index rendering with an optional remote source service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL