chart: refuse to render without an explicit namespace

Helm falls back to the "default" namespace when --namespace is omitted, so a
forgotten flag (or a Kustomize helmCharts entry without namespace) silently
deployed into the wrong place. Render the namespace through one helper that
fails on an empty or implicit "default" namespace, with allowDefaultNamespace
as an explicit opt-in.

scripts/check-chart.sh lints the chart, asserts every namespaced resource
carries the passed namespace, and checks both failure and opt-in paths. CI runs
it instead of the plain template call.

Bump the chart to 0.2.1.
This commit is contained in:
TapTap committed 2026-11-14 21:59:48 +00:00
1 parent 0cd0b9582d
commit 8e87fed93f
11 files changed
+120 -10

No files matched your search

+9 -1
View File
@@ -259,6 +259,7 @@ Image: gitea.tap-tap.win/taptap/audiomanager:<tag>
Chart: https://gitea.tap-tap.win/TapTap/Charts/raw/branch/main
```
Kustomize example:
```yaml
@@ -271,6 +272,12 @@ helmCharts:
valuesFile: values.yaml
```
The chart renders every resource into the namespace passed to Helm
(`--namespace` or `helmCharts[].namespace`) and refuses to render when that
namespace is missing or falls back to `default`, so a forgotten namespace cannot
deploy into the wrong place. Set `allowDefaultNamespace=true` to opt in to
`default`. `scripts/check-chart.sh` lints the chart and enforces this in CI.
The chart expects:
- a `users.yaml` Secret (Vault-managed) referenced by `users.existingSecret`;
@@ -300,8 +307,9 @@ The shared module owns the API client, auth store, SQLDelight offline database,
## Testing
```bash
gradle test # unit + API integration tests
gradle test # unit + API integration tests
GRADLE=gradle scripts/smoke.sh # end-to-end server smoke test
scripts/check-chart.sh # lint the chart and enforce the namespace rule
```
The smoke test generates tagged MP3s, starts the server, and verifies login, sync, moods, radio, add-to-mood, streaming, transcoding, covers, scan and logout.