Skip to content

feat(service-catalog): add representative media-service workload lane (closes #59)#194

Open
clubanderson wants to merge 1 commit into
projectbluefin:mainfrom
clubanderson:feat/service-catalog/media-service-lane
Open

feat(service-catalog): add representative media-service workload lane (closes #59)#194
clubanderson wants to merge 1 commit into
projectbluefin:mainfrom
clubanderson:feat/service-catalog/media-service-lane

Conversation

@clubanderson

Copy link
Copy Markdown
Contributor

Summary

Implements the first representative media-service validation lane under the service-catalog epic (#51). This PR closes #59 and makes the homelab service-catalog concrete rather than abstract.

Acceptance criteria check

New files

tests/service_catalog/media/test_media_service.py

12 test methods in TestMediaServiceLane:

Group Tests
Deployment ready, pod Running, service endpoints
Config PVC bound, capacity/access-modes, storage-class, writable
Data PVC bound, capacity/access-modes, writable
Reachability port 8096 in-cluster, cluster DNS
Env injection PUID/PGID/TZ present with expected values
Rollout persistence config + data sentinel survives pod replacement
Observability df/findmnt/stat for both mounts
pytest.skip#63; RWX → pytest.skip#62

argo/workflow-templates/homelab-media-service.yaml

ArgoCD-managed WorkflowTemplate (same DAG pattern as homelab-substrate, homelab-storage):

  • create-namespacedeploy-fixturerun-tests DAG
  • deploy-fixture: homelab-media-config 1Gi PVC + homelab-media-data 10Gi PVC, Deployment with PUID/PGID/TZ env and dual mounts, ClusterIP Service on port 8096
  • cleanup onExit handler with namespace deletion + wait-for-termination

argo/homelab-media-service.yaml

Workflow submit trigger (mirrors homelab-substrate.yaml pattern).

Updated files

docs/homelab-contracts.md

Dependencies

…projectbluefin#59)

Defines the first media-service validation lane under the service-catalog
epic (projectbluefin#51).  Implements the base in-cluster contract for a
Plex/Jellyfin/linuxserver.io-style workload without GPU transcoding or
RWX storage (those are split into projectbluefin#63 and projectbluefin#62 respectively).

## New files

### tests/service_catalog/media/test_media_service.py
pytest test class covering all acceptance criteria:
- Deployment becomes ready and pod reaches Running state
- ClusterIP service has endpoints on port 8096
- Config PVC (1Gi) and media-data PVC (10Gi) bind on local-path,
  mounts are writable, state survives rollout restart
- Port 8096 reachable in-cluster (TCP connect via wget from pod)
- Cluster DNS resolves service FQDN
- PUID / PGID / TZ env vars injected and present in container env
- Storage observability artifacts (df, findmnt, stat) for both mounts
- GPU transcoding explicitly skipped → projectbluefin#63
- RWX shared-media mount explicitly skipped → projectbluefin#62

### argo/workflow-templates/homelab-media-service.yaml
WorkflowTemplate (ArgoCD-managed):
- create-namespace → deploy-fixture → run-tests DAG
- deploy-fixture: two PVCs (homelab-media-config 1Gi, homelab-media-data
  10Gi), Deployment with PUID/PGID/TZ env + dual PVC mounts on port 8096,
  ClusterIP Service
- cleanup onExit handler deletes namespace and waits for termination

### argo/homelab-media-service.yaml
Workflow submit trigger referencing the WorkflowTemplate.

## Updated files

### docs/homelab-contracts.md
- Adds media-service row to the workload matrix table
- Adds media-service minimum persistence contract
- Removes the 'Media service lane: deferred' gap note
- Adds §7 Media-Service Workload Lane with full behavior table,
  out-of-scope table, dependency list, and fixture image note
- Updates §6 known-blockers table: projectbluefin#59 → implemented

Closes projectbluefin#59
Depends on projectbluefin#52, projectbluefin#53, projectbluefin#54

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service-catalog lane addition. Merge after foundational #202. LGTM.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by #204. This PR implements media-service lane using direct homelab-media-service WorkflowTemplate, but #204 reimplements it using the canonical service-catalog-pipeline approach (consistent with contract #200). Close in favor of #204.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approved ✅

Part of the structured service-catalog project build-up. Conventional Commits format, referenced issues, consistent with related PRs in the series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: define representative media-service workload lane for homelab validation

3 participants