hashgraph / hashgraph/solo-weaver
feat(consensus): install jobs from deployment package
- Dominant language
- Go
- Stars
- 3
- Forks
- 0
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
Execute phase-scoped K8s Jobs from the deployment package during consensus node install.
Parent epic: #408
Depends on: #1045
Blocked by: hashgraph/solo-operator#1077 (`pkg/jobs/` shared library)
### Context
Per HIP-1494, the deployment package may contain optional K8s Job descriptors in `jobs/`. Each declares a context (install/upgrade), phase, sequence, and failure policy. During install, only `context: install` jobs are executed.
Solo-operator is building a **shared `pkg/jobs/` library** (hashgraph/solo-operator#1077) with zero controller-runtime dependency, designed for solo-weaver to import. It provides:
- Job descriptor schema & parser (`jobs/*.yaml` → Go struct)
- K8s Job launcher & watcher (create / watch / exit code)
- Idempotency check (label query → skip/retry)
Solo-weaver owns the **install triggerer** role for `pre-install` and `post-install` phases.
### Scope
- Import `pkg/jobs/` from solo-operator (no controller-runtime dep)
- Scan `jobs/` directory in deployment package for Job descriptors
- Filter to `context: install` only (skip `context: upgrade`)
- Execute `pre-install` phase jobs before ConsensusCapsule creation
- Execute `post-install` phase jobs after ConsensusCapsule creation
- Respect `phase.sequence` for execution ordering within a phase
- Respect `failurePolicy`: Abort halts the workflow, Ignore logs and continues
- Idempotency via label-based lookup (operation-id + job-file stem)
- Watch pod exit code for completion
### Note
The `frozen` phase (upgrade context, triggered by solo-weaver daemon) is a separate concern under the upgrade epic, not this ticket.
### Acceptance Criteria
- [ ] Uses shared `pkg/jobs/` library from solo-operator
- [ ] Jobs scanned from `--deployment-package-dir` `jobs/` directory
- [ ] Only `context: install` jobs executed
- [ ] `pre-install` jobs run before ConsensusCapsule, `post-install` after
- [ ] Ordered by `phase.sequence`
- [ ] `failurePolicy: Abort` stops workflow; `Ignore` logs and continues
- [ ] Idempotent via label-based lookup
- [ ] Job completion watched via pod exit code
Contributor guide
Assessment
This issue has not been assessed yet.