refactor(music-assistant): fold seed KS into the app KS (seed->apps pilot) #385

Merged
k.renner merged 2 commits from move-music-assistant-to-apps into master 2026-07-24 11:40:28 +00:00
Member

Pilot for dissolving the transitional seed layer, per the plan — starting with the lowest-risk app (PVC-only, no database).

Moves the music-assistant-data PVC out of seed-music-assistant and into the app's own Kustomization, then retires the seed KS:

  • git mv kubernetes/seed/music-assistant/pvcs.yaml -> kubernetes/apps/music-assistant/ + added to the app kustomization.
  • Dropped dependsOn: seed-music-assistant from the music-assistant KS (now owns the PVC directly; infrastructure-ceph-cluster dep already present, no CNPG).
  • Deleted kubernetes/clusters/homelab/seed-music-assistant.yaml and the now-empty kubernetes/seed/music-assistant/.

Safe ownership transfer: the PVC already carries kustomize.toolkit.fluxcd.io/prune: disabled, so Flux GC skips it even while seed-music-assistant is pruned — the object is never deleted, and music-assistant adopts it on reconcile.

Verified: PVC music-assistant-data is Bound + prune-disabled live (currently owned by seed-music-assistant); kubectl kustomize apps/music-assistant builds with the PVC included.

Post-merge check: after Flux reconciles, the PVC's kustomize.toolkit.fluxcd.io/name label should flip to music-assistant and seed-music-assistant KS should be gone — I'll confirm both. Then the remaining apps (audiobookshelf -> influxdb -> woodpecker -> paperless -> immich -> authentik) follow the same pattern.

**Pilot** for dissolving the transitional `seed` layer, per the plan — starting with the lowest-risk app (PVC-only, no database). Moves the `music-assistant-data` PVC out of `seed-music-assistant` and into the app's own Kustomization, then retires the seed KS: - `git mv kubernetes/seed/music-assistant/pvcs.yaml -> kubernetes/apps/music-assistant/` + added to the app kustomization. - Dropped `dependsOn: seed-music-assistant` from the `music-assistant` KS (now owns the PVC directly; `infrastructure-ceph-cluster` dep already present, no CNPG). - Deleted `kubernetes/clusters/homelab/seed-music-assistant.yaml` and the now-empty `kubernetes/seed/music-assistant/`. **Safe ownership transfer:** the PVC already carries `kustomize.toolkit.fluxcd.io/prune: disabled`, so Flux GC skips it even while `seed-music-assistant` is pruned — the object is never deleted, and `music-assistant` adopts it on reconcile. **Verified:** PVC `music-assistant-data` is Bound + prune-disabled live (currently owned by `seed-music-assistant`); `kubectl kustomize apps/music-assistant` builds with the PVC included. **Post-merge check:** after Flux reconciles, the PVC's `kustomize.toolkit.fluxcd.io/name` label should flip to `music-assistant` and `seed-music-assistant` KS should be gone — I'll confirm both. Then the remaining apps (audiobookshelf -> influxdb -> woodpecker -> paperless -> immich -> authentik) follow the same pattern.
claude-bot added 1 commit 2026-07-24 11:20:36 +00:00
refactor(music-assistant): fold seed KS into the app KS
ci/woodpecker/pr/pr-review Pipeline was successful
efa5d6833c
First step of dissolving the transitional 'seed' layer: move the
music-assistant-data PVC from seed-music-assistant into the app's own
Kustomization and retire the seed KS.

- git mv kubernetes/seed/music-assistant/pvcs.yaml -> kubernetes/apps/music-assistant/
  and add it to the app kustomization.
- Drop 'dependsOn: seed-music-assistant' from the music-assistant KS (it now
  owns the PVC directly; ceph dep already present, no CNPG involved).
- Delete kubernetes/clusters/homelab/seed-music-assistant.yaml and the now-empty
  kubernetes/seed/music-assistant/.

Safe ownership transfer: the PVC already carries
kustomize.toolkit.fluxcd.io/prune: disabled, so Flux GC skips it even when the
seed-music-assistant KS is pruned — the object is never torn down, and the
music-assistant KS adopts it on next reconcile. Verified: PVC is Bound and
prune-disabled live; kubectl kustomize apps/music-assistant builds with the PVC.

Pilot for the per-app seed->apps relocation; remaining apps (audiobookshelf,
influxdb, woodpecker, paperless, immich, authentik) follow the same pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
review-bot left a comment
Member

🤖 Automated review — model claude-haiku-4-5-20251001 (complexity: trivial), commit efa5d6833c2192bc332bf38b247ad51875f07d46.

Advisory review by the review-bot pipeline. It never approves; a human merges. Push new commits to get a fresh review.


Summary

This PR successfully moves the music-assistant-data PVC out of the seed-music-assistant Kustomization into the app's own Kustomization and retires the seed layer for this app. The ownership transfer is safely handled via the existing kustomize.toolkit.fluxcd.io/prune: disabled annotation on the PVC, preventing accidental deletion during the migration. However, the e2e test script still references the deleted Kustomization and will fail after merge.

🔴 Blocking

kubernetes/e2e-test.sh:110 — The e2e test checks if seed-music-assistant Kustomization is Ready, but this PR deletes it. After merge, kubectl get kustomization seed-music-assistant will fail with "not found", causing the test to fail. Remove seed-music-assistant from the list on this line to match the new state.

🟡 Suggestions

kubernetes/MIGRATION-sops-openbao.md:195 — The documentation mentions "dormant ones on seed-audiobookshelf/seed-music-assistant" as files from which decryption blocks were dropped during the SOPS migration (2026-07-14). Since this PR deletes seed-music-assistant, the reference is now outdated. Consider updating the line to remove the mention of seed-music-assistant, or clarify that it has since been retired.

🟢 Nits

  • The PVC move is clean and the prune-disabled annotation provides the correct safeguard.
  • Comment updates in music-assistant.yaml clearly document the ownership change.
  • Dependency removal is correctly minimal (only seed-music-assistant is removed; infrastructure-* dependencies remain).

Tests

The e2e test needs to be fixed before this PR can pass. Once seed-music-assistant is removed from the kustomization check list in e2e-test.sh, the test should pass. No other test changes are needed; the PVC move is transparent to the app deployment and existing test coverage.

Recommendation

Request changes — 1 blocking issue. The e2e test script must be updated to remove the reference to the now-deleted seed-music-assistant Kustomization. Once fixed, the refactor is sound and the migration strategy is solid.

🤖 **Automated review** — model `claude-haiku-4-5-20251001` (complexity: trivial), commit `efa5d6833c2192bc332bf38b247ad51875f07d46`. > Advisory review by the `review-bot` pipeline. It never approves; a human merges. Push new commits to get a fresh review. --- ## Summary This PR successfully moves the `music-assistant-data` PVC out of the `seed-music-assistant` Kustomization into the app's own Kustomization and retires the seed layer for this app. The ownership transfer is safely handled via the existing `kustomize.toolkit.fluxcd.io/prune: disabled` annotation on the PVC, preventing accidental deletion during the migration. However, the e2e test script still references the deleted Kustomization and will fail after merge. ## 🔴 Blocking **`kubernetes/e2e-test.sh:110`** — The e2e test checks if `seed-music-assistant` Kustomization is Ready, but this PR deletes it. After merge, `kubectl get kustomization seed-music-assistant` will fail with "not found", causing the test to fail. Remove `seed-music-assistant` from the list on this line to match the new state. ## 🟡 Suggestions **`kubernetes/MIGRATION-sops-openbao.md:195`** — The documentation mentions "dormant ones on seed-audiobookshelf/seed-music-assistant" as files from which decryption blocks were dropped during the SOPS migration (2026-07-14). Since this PR deletes `seed-music-assistant`, the reference is now outdated. Consider updating the line to remove the mention of `seed-music-assistant`, or clarify that it has since been retired. ## 🟢 Nits - The PVC move is clean and the prune-disabled annotation provides the correct safeguard. - Comment updates in `music-assistant.yaml` clearly document the ownership change. - Dependency removal is correctly minimal (only `seed-music-assistant` is removed; `infrastructure-*` dependencies remain). ## Tests The e2e test needs to be fixed before this PR can pass. Once `seed-music-assistant` is removed from the kustomization check list in `e2e-test.sh`, the test should pass. No other test changes are needed; the PVC move is transparent to the app deployment and existing test coverage. ## Recommendation **Request changes — 1 blocking issue.** The e2e test script must be updated to remove the reference to the now-deleted `seed-music-assistant` Kustomization. Once fixed, the refactor is sound and the migration strategy is solid. <!-- pr-review:sha=efa5d6833c2192bc332bf38b247ad51875f07d46 -->
claude-bot added 1 commit 2026-07-24 11:26:20 +00:00
fix(e2e): drop retired seed-music-assistant from Kustomization checks
ci/woodpecker/pr/pr-review Pipeline was successful
9b3cb98bc6
Addresses review on #385.

Blocking: e2e-test.sh asserted kustomization/seed-music-assistant Ready, but
this PR deletes that KS — the test would fail post-merge with 'not found'.
Remove it from the checked list (line 110).

Also add a clarifying note in MIGRATION-sops-openbao.md that
seed-music-assistant has since been retired (the 2026-07-14 log line is left
factually intact as a historical record).

Co-Authored-By: Claude Bot <claude-bot@renner.uno>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
review-bot left a comment
Member

🤖 Automated review — model claude-haiku-4-5-20251001 (complexity: trivial), commit 9b3cb98bc6b27e12b4ab751c5c36f207ace6791a.

Advisory review by the review-bot pipeline. It never approves; a human merges. Push new commits to get a fresh review.


Summary

This PR successfully migrates the music-assistant-data PVC from the transitional seed-music-assistant Kustomization into the app's own Kustomization, then retires the seed KS. The refactoring is well-executed: the PVC's prune: disabled annotation ensures safe ownership transfer, all dependencies are correctly updated, and the change is tightly scoped to this one app as a pilot for dissolving the seed layer.

🟢 Nits

kubernetes/clusters/homelab/music-assistant.yaml:38–43 — Comment clarity: "The one-shot ssh+tar seed Job that originally populated it from the legacy LXC is long gone" could be slightly more specific (e.g., "The one-shot ssh+tar seed Job…is no longer deployed"). Minor — the existing phrasing is clear enough.

Tests

The e2e test suite has been correctly updated: seed-music-assistant removed from the Flux Kustomization readiness checks in kubernetes/e2e-test.sh:92. Velero backup schedules (kubernetes/infrastructure/post-crds/velero-schedules.yaml) are unaffected — music-assistant-daily continues to target the music-assistant namespace and will back up the PVC without modification.

Recommendation

Looks reasonable — no blocking issues; nit above is optional.

🤖 **Automated review** — model `claude-haiku-4-5-20251001` (complexity: trivial), commit `9b3cb98bc6b27e12b4ab751c5c36f207ace6791a`. > Advisory review by the `review-bot` pipeline. It never approves; a human merges. Push new commits to get a fresh review. --- ## Summary This PR successfully migrates the `music-assistant-data` PVC from the transitional `seed-music-assistant` Kustomization into the app's own Kustomization, then retires the seed KS. The refactoring is well-executed: the PVC's `prune: disabled` annotation ensures safe ownership transfer, all dependencies are correctly updated, and the change is tightly scoped to this one app as a pilot for dissolving the seed layer. ## 🟢 Nits **`kubernetes/clusters/homelab/music-assistant.yaml:38–43`** — Comment clarity: "The one-shot ssh+tar seed Job that originally populated it from the legacy LXC is long gone" could be slightly more specific (e.g., "The one-shot ssh+tar seed Job…is no longer deployed"). Minor — the existing phrasing is clear enough. ## Tests The e2e test suite has been correctly updated: `seed-music-assistant` removed from the Flux Kustomization readiness checks in `kubernetes/e2e-test.sh:92`. Velero backup schedules (`kubernetes/infrastructure/post-crds/velero-schedules.yaml`) are unaffected — `music-assistant-daily` continues to target the `music-assistant` namespace and will back up the PVC without modification. ## Recommendation Looks reasonable — no blocking issues; nit above is optional. <!-- pr-review:sha=9b3cb98bc6b27e12b4ab751c5c36f207ace6791a -->
k.renner merged commit 80666a8323 into master 2026-07-24 11:40:28 +00:00
Sign in to join this conversation.