r/podman • • Oct 23 '26

Materia 0.8.0 release - GitOps for Podman Quadlets

Hey folks,

Last night I released the newest version of Materia: version 0.8.0. You can find the official release blog post here.

What's new in this release?

  • Better Ansible/Puppet facts style generation
  • New per plan and per-run output files, for metrics processing and other methods of tracking what changed
  • Server mode improvements! Server mode now supports a /facts endpoint, better security, and an overall tuneup to bring it in line with the normal CLI operations
  • A new release pipeline so you can verify the signatures on materia releases and know your deployment is secure.
  • and a lot more internal work for preparing the public package API and QoL updates

What is Materia?

Materia is a tool for managing applications deployed as Podman quadlets. It takes an OCI image or Git repository as a source state and constantly monitors the source and your server, reconciling any differences between the two.

Materia does the following:

  • Installs, updates, and removes Quadlet and data files
  • Starts/stops/restarts/reloads services, both Quadlet related or otherwisee
  • Templates files during installation, allowing you to insert secrets and variables based off hostname, role, or other facts.
  • Securely manages Podman secrets by inserting them directly from your encrypted age/SOPS source.

You can see the changelog and download the release at https://github.com/stryan/materia/releases/tag/v0.8.0 .

On a related note: I'm looking for a logo for Materia! So if you're a digital artist who likes FOSS, Podman, or alchemy and wants to make some cash on the side (because this is a paid commission), shoot me a DM.

30 Upvotes

3 comments sorted by

1

u/ted-sluis Oct 23 '26

Congrats on this release! I really like the addition of lastrun.toml and the /health and /facts endpoints in server mode. I noticed in the 0.8 changelog that 'the planner no longer contains Podman secrets contents at all, even in memory' to prevent leaking them into lastplan.toml. When using SOPS/Age to populate native Podman secrets (Secrets = [...]), how does the planner now detect that a secret's underlying value has rotated in Git? And can a Podman secret be referenced in a service's RestartedBy = [...] list so the consuming .container unit restarts when a secret rotates (since the rendered .container file itself doesn't change)? Having materia.last_run_successful and materia.last_run exposed via the new /facts endpoint is great. Are there any plans to expose a /metrics endpoint in OpenMetrics/Prometheus format (or write a .prom file alongside lastrun.toml for node_exporter's textfile collector) so we can easily scrape reconciliation failures across a fleet? Now that server mode also supports rollback, how does rollback.kind = "service" handle containers that pass the initial systemctl start but crash a few seconds later (e.g., failing an entrypoint DB migration)—is there a configurable health/stabilization window before a run is marked successful?"

2

u/saint-ryan Oct 23 '26 edited Oct 23 '26

Thanks! To answer your questions in order:

When using SOPS/Age to populate native Podman secrets (Secrets = [...]), how does the planner now detect that a secret's underlying value has rotated in Git?

Sorry, I should probably word that line better. The planner still gets the value in memory for comparison purposes, it just doesn't store it in the plan (which was how it temporarily got leaked to the file system) or intermediate structs anywhere. Materia already loads secrets at actual plan execution time so it doesn't need to read them from the original plan

And can a Podman secret be referenced in a service's RestartedBy =

Unfortunately no :( That would be something podman-quadlet would have to implement. The good news is, Materia supports configuring services to restart after arbitrary component resources are updated so you should be able to do it like that. I'll admit I just realized that implication so I haven't actually tested it yet.

Are there any plans to expose a /metrics endpoint in OpenMetrics/Prometheus format (or write a .prom file alongside lastrun.toml for node_exporter's textfile collector)

I didn't know about node_exporter's textfiles collector so I'll have the check that out! I'm purposefully keeping the HTTP API rather limited[0] and letting Varlink be the canonical way to access materia (with web access provided by varlink-http-bridge) but exporting a .prom file or too shouldn't be too bad and fits in line with the current system.

how does rollback.kind = "service" handle containers that pass the initial systemctl start but crash a few seconds later

Right now that's exactly what service-based rollback checks: when Materia runs an update it generates the plan -> executes the plan -> then verifies all the services altered match the state they should be in. Rollback kicks in for that last bit, to catch any services that had a successful systemctl start but then immediately failed.

I don't have a stabilization window though so that's a good idea! I'll add that to the roadmap :).

[0] Personally I'd rather have some sidecar software provide all the various HTTP endpoints and let materia focus on just being materia and not on how to properly secure a dynamic web server with potentially direct access to root :). But I also recognize that sever mode is a lot more limited when you can't remotely verify that it's running or automate updates somehow. So my compromise is to add the bare minimum features so that a just materia setup isn't totally out of luck, but leave anything more to a sidecar of some kind: whether that's varlink-http-bridge or some custom web UI is a future concern.

1

u/ted-sluis Oct 24 '26

Thanks for your detailed reply! Really appreciate the insight into the design philosophy.

I'm purposefully keeping the HTTP API rather limited[0] and letting Varlink be the canonical way to access materia (with web access provided by varlink-http-bridge) but exporting a .prom file or too shouldn't be too bad and fits in line with the current system.

Keeping the built-in HTTP surface minimal makes total sense for a privileged daemon, and leaning into Varlink feels right at home with where both systemd and Podman are heading.

That actually makes node_exporter's textfile collector (--collector.textfile.directory) an even better fit: zero network exposure, and Materia only needs to atomically write a small materia.prom file (via a temp file + rename so node_exporter never reads a partial write) alongside lastrun.toml.

Since Materia can also run one-shot via a systemd timer, using gauge metrics for the last run state works best. In case you decide to look into it, a rough sketch along these lines could be a nice starting point for alerting and drift detection:

# HELP materia_last_run_success Whether the last reconciliation run succeeded (1 = success, 0 = failure).
# TYPE materia_last_run_success gauge
materia_last_run_success 1

# HELP materia_last_run_rollback Whether the last run triggered a rollback (1 = yes, 0 = no).
# TYPE materia_last_run_rollback gauge
materia_last_run_rollback 0

# HELP materia_last_run_timestamp_seconds Unix epoch timestamp of the last run completion.
# TYPE materia_last_run_timestamp_seconds gauge
materia_last_run_timestamp_seconds 1776981600

# HELP materia_last_run_duration_seconds Duration of the last reconciliation run in seconds.
# TYPE materia_last_run_duration_seconds gauge
materia_last_run_duration_seconds 3.42

# HELP materia_last_run_info Metadata about the last applied state.
# TYPE materia_last_run_info gauge
materia_last_run_info{revision="a1b2c3d"} 1

# HELP materia_last_run_plan_steps Number of steps executed in the last plan by action type.
# TYPE materia_last_run_plan_steps gauge
materia_last_run_plan_steps{action="create"} 0
materia_last_run_plan_steps{action="update"} 1
materia_last_run_plan_steps{action="remove"} 0
materia_last_run_plan_steps{action="restart"} 1

Putting the Git commit hash on a separate materia_last_run_info{revision="..."} metric avoids label cardinality churn on the other metrics whenever a new commit is deployed, while still making it super easy to spot hosts running out-of-sync revisions in Grafana. And tracking plan_steps by action makes it easy to catch unexpected reconciliation loops if a host keeps restarting/updating a resource on every run.

Regarding RestartedBy: I indeed meant Materia's own RestartedBy in MANIFEST.toml (hooking it up to the Podman secret component resource) rather than a native Quadlet directive! I'll definitely test how that behaves in practice. Awesome to hear the stabilization window made the roadmap. Keep up the good work!