How containers/fetchit works
FetchIt is a scheduled GitOps reconciler for Podman hosts. Its principal workflow is to load target configuration, retrieve and compare Git state, then dispatch configured methods that apply workloads or host artifacts through Podman/systemd; optional lifecycle cleanup and rollback handle removed or failed changes. The graph preserves documented deployment, storage, source-authentication, monitoring, and recovery capabilities. Some method wiring is not present in the sampled excerpts, so those documented relationships cite the README; unsampled implementation details are not inferred.
Main entry points: fetchit.go Scheduled targets · systemd.go Systemd services · main.go CLI entry · apply.go Git fetch and diff
Components 20
Runtime orchestration
- CLI entry
cmd/fetchit/main.go - Engine commands
pkg/engine/fetchit.go - Target configuration
pkg/engine/config.go - Scheduled targets
pkg/engine/fetchit.go
Git sources
- Git fetch and diff
pkg/engine/apply.go - Git auth and mirrors
pkg/engine/gitauth.go
Deployment methods
- Raw containers
pkg/engine/raw.go - Kube workloads
pkg/engine/kube.go - Quadlet bundles
pkg/engine/quadlet.go - File transfer
pkg/engine/filetransfer.go - Ansible method
pkg/engine/ansible.go
Host operations
- Systemd services
pkg/engine/systemd.go - Host artifacts
pkg/engine/host_artifacts.go - Named volumes
pkg/engine/volumes.go
State and observability
- Removal cleanup
pkg/engine/removals.go - Apply rollback
pkg/engine/rollback.go - Status endpoints
pkg/engine/status.go
Other components
- Host operator
- Podman API
- Host systemd
Connections 21
- Host operator → CLI entry: starts
README.md - CLI entry → Engine commands: executes
cmd/fetchit/main.go - Engine commands → Target configuration: loads
README.md - Engine commands → Scheduled targets: schedules
pkg/engine/fetchit.go - Scheduled targets → Git fetch and diff: reconciles
README.md - Git fetch and diff → Git auth and mirrors: authenticates
- Scheduled targets → Raw containers: dispatches
- Scheduled targets → Kube workloads: dispatches
- Scheduled targets → Quadlet bundles: dispatches
README.md - Scheduled targets → File transfer: dispatches
README.md - Scheduled targets → Ansible method: dispatches
README.md - Scheduled targets → Systemd services: dispatches
README.md - Scheduled targets → Host artifacts: dispatches
README.md - Raw containers → Podman API: creates containers
pkg/engine/raw.go - Kube workloads → Podman API: plays workloads
pkg/engine/kube.go - Systemd services → Podman API: runs helper
pkg/engine/systemd.go - Systemd services → Host systemd: manages services
README.md - Scheduled targets → Named volumes: provisions
README.md - Scheduled targets → Removal cleanup: cleans removals
README.md - Scheduled targets → Apply rollback: can roll back
README.md - Engine commands → Status endpoints: exposes status
README.md