Skip to content

feat: add service-catalog pipeline and shared homelab workload test harness#202

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

feat: add service-catalog pipeline and shared homelab workload test harness#202
clubanderson wants to merge 1 commit into
projectbluefin:mainfrom
clubanderson:feat/service-catalog-pipeline

Conversation

@clubanderson

Copy link
Copy Markdown
Contributor

Summary

Implements the shared k8s-native service-catalog execution path under #51, closing #79. This unblocks the first media (#80) and non-media (#81) lane implementations.

Argo workflow templates

  • service-catalog-pipeline.yaml — top-level pipeline: create namespace, deploy lane manifests, run tests, cleanup on exit. Accepts lane, image-tag, and branch parameters.
  • run-service-tests.yaml — non-GNOME test runner: clones testing-lab, discovers tests/service_catalog/<lane>/, runs pytest with JUnit XML output, emits summary to stdout for Argo/Loki.
  • service-catalog-smoke.yaml — submit wrapper for convenience.

Shared test helpers (tests/service_catalog/shared/)

  • deploy.py — deployment readiness, pod running state, endpoints, event capture
  • persistence.py — PVC bound assertion, sentinel file write/read across restart, pod UID change verification
  • reachability.py — cluster DNS resolution, HTTP/HTTPS response, TLS handshake
  • redeploy.py — image tag upgrade, rollout verification, running image assertion
  • teardown.py — namespace existence check, cluster-scoped resource leak detection

Operator entry points

  • Justfilerun-service-catalog-smoke with lane/image-tag/branch params
  • WORKFLOWS.md — service-catalog-pipeline and run-service-tests documentation
  • RUNBOOK.md — architecture diagram, adding-a-lane guide, result inspection, failure modes

How lanes plug in

Each lane provides:

  1. tests/service_catalog/<lane>/manifests.yaml — k8s manifests
  2. tests/service_catalog/<lane>/test_<lane>.py — pytest suite importing shared helpers

The pipeline is lane-agnostic; it reads the lane name from the lane parameter and discovers manifests + tests by convention.

Links

Test plan

  • just run-service-catalog-smoke submits the workflow
  • Deploy step fails gracefully with clear error when lane manifests are missing
  • Test runner fails gracefully when lane test directory is missing
  • Namespace cleanup runs on exit regardless of test outcome
  • Shared helpers import cleanly and provide the contract-required assertions
  • WORKFLOWS.md and RUNBOOK.md accurately describe the new pipeline

…rojectbluefin#79)

Implement the shared k8s-native execution path for service-catalog
validation under projectbluefin#51. This provides the pipeline, test runner, shared
helpers, and operator entry points that the first media (projectbluefin#80) and
non-media (projectbluefin#81) lanes will use.

Argo workflow templates:
- service-catalog-pipeline.yaml: top-level pipeline that creates an
  ephemeral namespace, deploys lane manifests, runs tests, cleans up
- run-service-tests.yaml: non-GNOME test runner that clones testing-lab,
  discovers the lane test suite, runs pytest, emits JUnit XML + summary

Submit wrapper:
- argo/service-catalog-smoke.yaml for direct submission

Shared test helpers (tests/service_catalog/shared/):
- deploy.py: deployment readiness, pod running, endpoints, events
- persistence.py: PVC bound, sentinel write/read, rollout restart
- reachability.py: DNS resolution, HTTP/HTTPS, TLS handshake
- redeploy.py: image upgrade, config change, rollout verification
- teardown.py: namespace existence, cluster-scoped leak detection

Operator entry points:
- Justfile: run-service-catalog-smoke with lane/image-tag/branch params
- WORKFLOWS.md: service-catalog-pipeline docs + run-service-tests docs
- RUNBOOK.md: architecture diagram, adding-a-lane guide, result inspection

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: unknown <unknown@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.

LGTM — well-structured test/infra addition, clean code.

@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.

This is the foundational service-catalog pipeline PR — the remaining service-catalog lane PRs (#193, #194, #195, #196, #197, #198, #199, #200, #201, #203, #204, #205) all depend on this landing first. Merge this one before the lane-specific PRs. 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.

Lane-parameterization verification needed. Foundational PR -- shared helpers must be verified for lane-agnostic operation.

Required verification:

  1. Verify all shared helpers (deploy.py, persistence.py, reachability.py, redeploy.py, teardown.py) accept deployment name as parameter, not hardcoded.
  2. APP_LABEL default app=service-catalog-workload will not match lane-specific labels like app=homelab-media-service. Tests must override via env vars, and shared modules must accept label selector as parameter.

Builds on: #200 (contract -- merge first)

@castrojo

Copy link
Copy Markdown
Collaborator

Scope check before this stack lands — tagging for maintainer review.

PRs #200#205 introduce a service-catalog testing layer (Jellyfin, CUPS/OpenPrinting, HTTPS exposure, auth-gating) that runs pytest in-cluster against Kubernetes deployments. This is a different paradigm from the rest of the repo, which provisions fresh KubeVirt VMs and tests Bluefin's atomic OS contract via behave/qecore.

AGENTS.md north star:

"Validate bootc, staged deployments, rollback behavior, read-only /usr, signature policy, composefs/fs-verity, and uupd orchestration before inventing DNF/RPM-style checks."
"Treat Homebrew, Flatpak, Podman, and Docker/Colima as decoupled user-space layers."
"Bias new issues and tests toward immutable-state evidence."

The service-catalog tests prove Kubernetes-native workload contracts (PVC lifecycle, reachability, rollout persistence) rather than Bluefin's atomic OS properties. homelab-substrate, homelab-storage, and homelab-access-probe already exist and seem to be the right base for this kind of in-cluster validation.

Questions for the maintainer:

  1. Is the service-catalog direction intentionally expanding scope beyond the atomic OS mandate, or should these tests be framed as "homelab workload contract" tests that are explicitly secondary?
  2. The base pipeline PR (feat: add service-catalog pipeline and shared homelab workload test harness #202) introduces service-catalog-pipeline and run-service-tests WorkflowTemplates — ArgoCD will sync these to the cluster. Is that the intent?
  3. Should these be gated as optional/experimental so they don't get added to nightlies?

Not blocking — just flagging before 10 PRs land at once. The code itself is well-structured and the test isolation (skip gates, deferred lanes, onExit cleanup) is solid.

@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: add service-catalog pipeline and shared homelab workload test harness

4 participants