Skip to content

Phase 6: Pod-based task execution with sidecar support#19

Merged
vdemeester merged 4 commits intomainfrom
feature/polish
Feb 6, 2026
Merged

Phase 6: Pod-based task execution with sidecar support#19
vdemeester merged 4 commits intomainfrom
feature/polish

Conversation

@vdemeester
Copy link
Copy Markdown
Owner

Summary

Implements pod-based task execution for mallet, similar to how Tekton runs tasks in Kubernetes pods:

  • Pod-per-task: Each task runs in its own Podman pod
  • Shared network namespace: Sidecars and steps can communicate via localhost
  • Sidecar hostname resolution: Host aliases map sidecar names to 127.0.0.1

Bug Fixes

  • Apply stepTemplate defaults to steps (image, env, workingDir)
  • Handle task-level volumes with emptyDir support
  • Variable substitution in workingDir
  • Override entrypoint for scripts (handles images with custom entrypoints like alpine/git)
  • Create workingDir if it doesn't exist

New Features

  • CreatePodWithOptions: Pods with host aliases for sidecar name resolution
  • RunContainerInPod: Full container lifecycle within a pod
  • Refactored executeTask to use pods for all tasks

Test Results

All 13 example pipelines now pass:

  • hello, params, results, parallel, matrix, when, retry, timeout ✅
  • steptemplate, volumes, verbose, workspace-override ✅
  • sidecar: Now works! Redis accessible via redis:6379

Test plan

  • All unit tests pass (go test ./...)
  • All 13 example pipelines pass with mallet
  • Sidecar example connects to Redis by hostname

🤖 Generated with Claude Code

vdemeester and others added 4 commits February 6, 2026 16:11
- Apply stepTemplate defaults to steps (image, env, workingDir)
- Handle task-level volumes with emptyDir support
- Add variable substitution for workingDir
- Override entrypoint for scripts to handle images with custom entrypoints
- Create workingDir if it doesn't exist in container

These fixes enable most example pipelines to run successfully with mallet:
- steptemplate-pipelinerun: Now works with stepTemplate image/env
- volumes-pipelinerun: Now correctly mounts emptyDir volumes
- workspace-override-pipelinerun: Now substitutes workspace paths in workingDir

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
12/13 examples now passing with mallet:
- Fixed stepTemplate, volumes, workingDir, and entrypoint issues
- Sidecar networking is a known limitation (standalone containers)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Similar to Tekton, each task now runs in its own Podman pod:
- All containers share network namespace (sidecars accessible via localhost)
- Host aliases map sidecar names to 127.0.0.1 for DNS resolution
- Steps run sequentially in the pod
- Sidecars run alongside steps and are accessible by hostname

Changes:
- CreatePodWithOptions: Support host aliases for sidecar name resolution
- CreateContainerInPod: Use pod field in JSON body instead of query param
- RunContainerInPod: Full container lifecycle within a pod
- executeTask: Refactored to use pods, start sidecars, run steps in pod

All 13 example pipelines now pass, including sidecar-pipelinerun.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vdemeester vdemeester enabled auto-merge (rebase) February 6, 2026 15:31
@vdemeester vdemeester merged commit 2a3b77c into main Feb 6, 2026
3 checks passed
@vdemeester vdemeester deleted the feature/polish branch February 6, 2026 15:34
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