Commit 2f00e03
feat(runners): implement Tekton Pipeline runner with native metadata discovery
Add a new TektonPipeline runner that discovers Tekton metadata natively
using a two-tier approach:
- Tier 1: HOSTNAME env var and ServiceAccount namespace file (always available)
- Tier 2: K8s API pod labels for rich tekton.dev/* metadata (best-effort)
The runner promotes 7 env vars (2 required, 5 optional) following the
Dagger runner pattern. TEKTON_TASK_NAME is optional since inline taskSpec
pipelines lack the tekton.dev/task label. TEKTON_TASKRUN_NAME falls back
to hostname derivation when K8s API labels are unavailable.
context.Context is passed as a function parameter to discoverLabelsFromKubeAPI()
rather than stored in the struct, following Go best practices.
Includes comprehensive unit tests, e2e test binary with Environment
validation, and tekton:// URI scheme for RunURI.
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 3d856a3 commit 2f00e03
4 files changed
Lines changed: 1394 additions & 8 deletions
File tree
- pkg/attestation/crafter
- runners
- test/e2e/tekton-runner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
| 99 | + | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
0 commit comments