Commit cbcf765
committed
feat(runners): implement Tekton Pipeline runner with native metadata discovery
Implement the TektonPipeline runner with two-tier native metadata
discovery and all SupportedRunner interface methods.
Tier 1 (always available): reads HOSTNAME env var and ServiceAccount
namespace file from the pod filesystem.
Tier 2 (best-effort): queries the K8s API for pod labels with
tekton.dev/* prefix, providing rich pipeline context. Gracefully
degrades when RBAC is denied or SA token is missing.
Interface methods:
- RunURI: Tekton Dashboard URL when configured, tekton-pipeline://
identifier URI as fallback
- Report: writes attestation summary to /tekton/results/ with
3500-byte truncation for Tekton Results size limits
- Environment: detects GKE/EKS/AKS as Managed, plain K8s as
SelfHosted
- ResolveEnvVars: synthesizes discovered metadata as key-value entries
- ListEnvVars: returns HOSTNAME as the only consumed env var
Includes 26 unit tests covering discovery success, RBAC denial,
missing SA token, all RunURI variants, Report truncation, Environment
detection, and ResolveEnvVars with full and minimal label sets.1 parent 3d856a3 commit cbcf765
3 files changed
Lines changed: 998 additions & 8 deletions
| 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