Kubernetes Runner allow for container security context
Description
In addition to setting security context at the pod level, you can override it for each container in the pod in Kubernetes.
When required to run all containers/pods as non-root users, the build, service and helper containers will not always work as the same non-root user. We need a way to set these security contexts individually.
Even more ideal would be if we could set the security context for the build and service containers from within the CI file.
Even if we can configure the container security context on the runner, until it can be done inside the CI file, some devs will likely have to use different runners for different CI jobs simply because they are using a different image that is required to run as a different non-root user.
Proposal
Add the ability to specify default security contexts for build, service and helper containers in the runner configuration. Add the ability to override the build and service container security contexts from the CI file.
Links to related issues and merge requests / references
Here's the K8s documentation: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
This MR !1111 (closed) has some of the functionality, but not all of it (e.g. it's missing command line flags and env vars for the container security context).