Skip to content

Draft: Feat/k8s job

Eileen Yu requested to merge Eileen-Yu/package-hunter:feat/k8s-job into main

Data sharing between api and job

  1. Add an internal API endpoint from which a job can request the data, e.g. /internal/give-me-all-data-for-job?id=<job id goes here>
  2. Add an init container to the job which pulls the required data from the api created in the previous step. So the init container would call internal/give-me-all-data-for-job?id=123 and store the data. Example: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#init-containers-in-use
  3. The init container shares the data with the main container (i.e. image maldep) via a volume. This doesn’t have to be any special volume, a plain old emptyDir volume works. https://kubernetes.io/docs/tasks/access-application-cluster/_print/#creating-a-pod-that-runs-two-containers

Merge request reports