sourcegraph/cmd/executor/internal
Peter Guy f8cc07220a
chore/executors: Native Kubernetes Executors default to use single job pod (#64088)
For Executors on Native Kubernetes deployments, the option to run jobs
in a single pod has been available since Native Kubernetes has been
around.

The purpose of running jobs in a single pod is:
1. Efficiency. Jobs require three steps at least, and without specifying
a single pod, that requires spinning up three pods.
2. Security. For Batch Changes, when jobs are run across several pods,
`git`'s `safe.directory` must be set to avoid untrusted users or
processes injecting code or an attack. Running the job in one pod
removes the need for `safe.directory`.
3. Usability. Because of the need to set `safe.directory`, `root` access
to write to `git`'s global config is required, which means that many
times special configurations and sign-offs from security teams must be
used for Batch Change setups.

This PR takes a step toward using single pod jobs only in enabling them
by default instead of requiring an environment variable to enable them.

The same environment variable that was used to enable them -
`KUBERNETES_SINGLE_JOB_POD` - is still available to disable them by
setting it to `false`.

## Test plan

Bazel and CI for now

## Changelog
2024-07-31 08:07:06 -07:00
..
apiclient chore/deps: upgrade grpc, prometheus/common (#63328) 2024-06-19 09:55:44 -04:00
config chore/executors: Native Kubernetes Executors default to use single job pod (#64088) 2024-07-31 08:07:06 -07:00
ignite bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
janitor bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
metrics bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
run lib/background: upgrade Routine interface with context and errors (#62136) 2024-05-24 10:04:55 -04:00
util bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
worker chore: Change errors.HasType to respect multi-errors (#63024) 2024-06-06 13:02:14 +00:00