ytdlp-web-player: new chart with an optional oauth2-proxy subchart (1.0.0+upv1.2.0)

Deploys matszwe02/ytdlp_web_player, a Flask app that fetches videos with
yt-dlp, transcodes them with ffmpeg and serves them as HLS. It ships no
authentication of any kind, so the chart carries a preconfigured oauth2-proxy
as an optional subchart, in the data path in front of the app.

This is the first chart in the repo with a dependency, so the rule "charts
have no dependencies" falls here. It is replaced in CLAUDE.md and README.md by
a bar: a dependency has to be optional and off by default, upstream's chart is
consumed as it comes (documented where it falls short of our conventions,
never patched), and the price is written down - above all that a subchart is
invisible to everything downstream watching Helm release versions, so a new
proxy release only reaches a cluster when this chart is republished.

CI learns the dependency in five places, not the three the plan expected:
helm lint, package, template and install all exit 1 while charts/ is unfilled,
so ci/helm-dependencies.sh runs before lint and package in validate-charts.yml,
before package in publish-helm-chart.yml, and inside run-install-test.sh,
run-trivy-config.sh and run-quantity-render-test.sh - the last of which renders
every chart on every PR and would have gone red first.

Notable chart decisions, each measured rather than assumed:

- The image has no USER and runs as root by default, but not by necessity: it
  runs under an arbitrary uid with readOnlyRootFilesystem and the full
  hardening baseline. Only the pinned uid is a deviation, and it is documented.
- Two emptyDirs, each justified separately. /data holds the video cache
  (DATA_PATH). /tmp is NOT mounted - measured across metadata extraction, HLS
  transcoding, sprite generation and audio extraction, the image never writes
  there. What it does write is $HOME/.cache, so /cache is mounted with HOME and
  XDG_CACHE_HOME pointed at it; without it yt-dlp re-downloads its JavaScript
  challenge-solver from github.com on every extraction.
- The proxy is wired through config.configFile, the only value the subchart
  passes through tpl - config.upstreams is emitted with toJson and would carry
  a literal {{ .Release.Name }} into the manifest.
- Rendering aborts when this chart's Ingress and the proxy's claim the same
  host: ingress-nginx rejects the second one and a Fleet bundle then sits in
  ErrApplied until forceSyncGeneration is bumped.

Fixes #214
This commit is contained in:
jklein committed 2026-08-30 17:34:49 +02:00
1 parent 3e1088410e
commit 6b0d8c9232
23 files changed
+1706 -8

No files matched your search

+12 -3
View File
@@ -26,9 +26,9 @@
# case is not - it needs the rendered text to be searched for a quantity in
# exponential notation. Both are checked here, per chart.
#
# Why over *all* charts instead of the changed ones: charts in this repo have
# no dependencies, so the helper is copied into every chart's
# templates/_helpers.tpl. The regression this guards against arrives by copy -
# Why over *all* charts instead of the changed ones: the helper is copied into
# every chart's templates/_helpers.tpl rather than shared through a library
# chart. The regression this guards against arrives by copy -
# a new chart started from an older chart, or from template-chart before the
# fix. That chart is new to the repo, but its copy of the bug is not something
# any diff of *this* PR would point at. The test is cheap enough (two renders
@@ -111,6 +111,15 @@ for CHART in "${CHARTS[@]}"; do
echo "ERROR: '$CHART' is not a chart directory" >&2
exit 1
fi
# A chart with a declared dependency cannot be rendered at all while its
# charts/ directory is empty - helm template exits 1 before it reaches a
# single template. This job is the one that would notice first, because it
# runs over EVERY chart on EVERY pull request: without this line, a PR
# touching nothing but a README would go red on ytdlp-web-player. The script
# skips charts that declare none, which is still all but one of them.
"$ROOT/ci/helm-dependencies.sh" "$ROOT/$CHART"
SCHEMA="$ROOT/$CHART/values.schema.json"
if [ ! -f "$SCHEMA" ]; then
echo "::error title=quantity-render $CHART::$CHART has no values.schema.json - every chart in this repo ships one (README, \"Values that must not lie\"), and this test reads the resources paths from it."