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:

  1. Concrete-mode pod assembly (steps_pod.go).
  2. steps.Connector implementation (steps.go) + featuresFn advertisement + shared withPullRetry covering both classic and Concrete dispatch.
  3. Adapt shared K8s paths for the no-helper-container pod shape.
  4. Regression canary for the getVolumeMounts logs-mount guard.
  5. K8s integration tests behind //go:build integration && kubernetes.
  6. Wire FF_CONCRETE into the integration matrix + OnUserStageWhen / OnAnyStage test helpers + Concrete-aware test variants + in-test t.Skip guards on the known FF_CONCRETE gaps so the matrix can run without allow_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.

  1. feat: pod assembly + Connector + withPullRetry. (Commits 1+2)
  2. refactor: shared K8s paths. (Commit 3)
  3. test: getVolumeMounts regression canary. (Commit 4)
  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 as Job failed (system failure): under Concrete dispatch; the job report's failure_reason is empty for these cases. Affects every executor implementing steps.Connector, not only K8s.
  • testKubernetesDisableUmask (3 of 7 sub-cases) — Concrete pod honours RunAsUser/RunAsGroup even in umask-enabled mode where attach mode overrides to root.
  • Empty spec.Step.When — Concrete builder maps unset When to neither-on-success-nor-on-failure; test fixtures use explicit spec.StepWhenAlways as 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=true once CI is green.

Out of scope

Windows K8s nodes (runtime failure of steps serve is loud); the four FF_CONCRETE gaps listed above.

Edited by Romuald Atchadé

Merge request reports

Loading