sidecar
Sidecar — Deploy-Time Pod Composition
Overview
Sidecars are additional containers that run alongside an application container in a shared Podman pod. They share the network namespace (localhost connectivity) while maintaining separate filesystems. Sidecar templates are embedded in the charly binary — any image can get any sidecar at deploy time without image rebuilds.
Quick Reference
| Action | Command |
|---|---|
| List available sidecars | charly config --list-sidecars |
| Attach sidecar | charly config <image> --sidecar tailscale |
| Attach with env | charly config <image> --sidecar tailscale -e TS_HOSTNAME=my-app |
| Check sidecar status | charly cmd <image> --sidecar tailscale "tailscale status" |
Architecture
Sidecar templates are compiled into the charly binary via go:embed — they are name-first sidecar-kind nodes in the embedded default charly/charly.yml (plain node-form YAML), parsed through the SAME unified loader as any project charly.yml (folded into UnifiedFile.Sidecar). A project may also declare its own sidecar-kind nodes that extend/override the embedded set. At deploy time, charly config --sidecar <name> merges the embedded template with the project's templates and the per-machine overrides from charly.yml, then generates quadlet files.