Enable GitLab Functions on Kubernetes executor
Summary
Add native CI Functions (steps) support to the Kubernetes executor by
implementing steps.Connector. Concrete-mode jobs run in a minimal
pod (build container running steps serve + user services + one
bootstrap init container, single scripts emptyDir). The executor
stays thin: pod assembly, ready-marker detection over a log-follow
stream, per-invocation SPDY exec dialer for the step-runner proxy.
Closes step-runner#466 (closed) Mode decision-of-record: step-runner#292 (comment 3385361536)
Commits
Six atomic commits, each compiling and passing tests independently:
- Concrete-mode pod assembly (
steps_pod.go). steps.Connectorimplementation (steps.go) +featuresFnadvertisement + sharedwithPullRetrycovering both classic and Concrete dispatch.- Adapt shared K8s paths for the no-helper-container pod shape.
- Regression canary for the
getVolumeMountslogs-mount guard. - K8s integration tests behind
//go:build integration && kubernetes. - Wire
FF_CONCRETEinto the integration matrix +OnUserStageWhen/OnAnyStagetest helpers + Concrete-aware test variants + in-testt.Skipguards on the known FF_CONCRETE gaps so the matrix can run withoutallow_failure.
The concrete CI Function itself is already in main (merge
d81649ab); this MR is scoped to the K8s executor wiring.
Proposed split — 4 stacked MRs
Each targets the previous; after MR N merges, MR N+1 auto-retargets
to main.
feat: pod assembly + Connector +withPullRetry. (Commits 1+2)refactor: shared K8s paths. (Commit 3)test:getVolumeMountsregression canary. (Commit 4)test: integration tests + matrix wiring. (Commits 5+6)
Known FF_CONCRETE gaps (gated via in-test t.Skip)
Each is skipped under FF_CONCRETE with a short reason in the test body. Follow-up issues will replace the reasons with issue links as each gap is investigated.
testKubernetesBuildMasking— token-prefix masking is not yet propagated through the step-runner protocol. Per-variable masking (Masked: true) works as expected.testKubernetesContainerHookFeatureFlag/invalid_hook_configuration— pre-step infrastructure errors do not surface asJob failed (system failure):under Concrete dispatch; the job report'sfailure_reasonis empty for these cases. Affects every executor implementingsteps.Connector, not only K8s.testKubernetesDisableUmask(3 of 7 sub-cases) — Concrete pod honoursRunAsUser/RunAsGroupeven in umask-enabled mode where attach mode overrides to root.- Empty
spec.Step.When— Concrete builder maps unsetWhento neither-on-success-nor-on-failure; test fixtures use explicitspec.StepWhenAlwaysas workaround. Real fix belongs upstream.
Test plan
- Unit tests (
steps_pod_test.go,steps_test.go). - Local matrix: 44 tests under
FF_CONCRETE=true, sequential. - CI pipeline (this MR).
- Manual cluster run with
FF_CONCRETE=trueonce CI is green.
Out of scope
Windows K8s nodes (runtime failure of steps serve is loud); the
four FF_CONCRETE gaps listed above.