Skip to content

Phase 5: Sidecars & Cleanup Implementation#18

Merged
vdemeester merged 3 commits intomainfrom
feature/sidecars
Feb 6, 2026
Merged

Phase 5: Sidecars & Cleanup Implementation#18
vdemeester merged 3 commits intomainfrom
feature/sidecars

Conversation

@vdemeester
Copy link
Copy Markdown
Owner

Summary

  • Implement sidecar support for Podman backend
  • Implement resource cleanup/tracking
  • Make container command optional (use image default entrypoint)

Changes

Sidecar Support (~285 LOC)

  • Add sidecar.go with pod operations:
    • CreatePod, StartPod, StopPod, RemovePod
    • CreateContainerInPod for running containers inside pods
  • Implement StartSidecar and StopSidecar methods
  • Sidecars run as standalone containers (pod-based network sharing in future)

Resource Cleanup (~150 LOC)

  • Add cleanup.go with ResourceTracker:
    • Thread-safe tracking of containers, pods, volumes
    • CleanupAll removes all tracked resources
    • Uses fresh context with timeout (handles canceled contexts)
  • Add RemoveVolume function

Container Spec Changes

  • Make command optional in ContainerSpec.Validate()
  • Allows sidecars to use image default entrypoint (e.g., redis)

Test plan

  • All podman tests pass (~44s)
  • All existing tests pass
  • Sidecar lifecycle tests pass
  • Cleanup tests pass

🤖 Generated with Claude Code

vdemeester and others added 3 commits February 6, 2026 15:48
- Add sidecar.go with pod operations (CreatePod, StartPod, StopPod, RemovePod)
- Implement StartSidecar and StopSidecar methods
- Add CreateContainerInPod for running containers inside pods
- Make container command optional (use image default entrypoint)
- Add comprehensive tests for sidecar lifecycle

TDD approach: tests written first, then implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ResourceTracker for tracking containers, pods, and volumes
- Thread-safe tracking with mutex protection
- CleanupAll removes all tracked resources
- Uses fresh context with timeout for cleanup (handles canceled contexts)
- Add RemoveVolume function for volume cleanup

TDD approach: tests written first, then implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vdemeester vdemeester merged commit f28743f into main Feb 6, 2026
3 checks passed
@vdemeester vdemeester deleted the feature/sidecars branch February 6, 2026 14:57
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.

1 participant