Skip to content

Move project cloning to post start event

MR: Move workspace project cloning to post start (!192345 - merged)

Description

When you create a workspace, the project is cloned as part of an init container. This creates the following problems -

  • Using alpine/git container image from DockerHub is a supply chain security issue.
  • Using alpine/git container image from DockerHub can result in rate limiting.
  • Customers with GitLab on a private domain cannot configure the init container to inject custom TLS certificates for successful project cloning.
  • If the project is medium-to-large, the project cloning might fail if there is not enough memory/cpu. One can never predict a one-size-fits-all for this case. Hence, it is not feasible to constantly keep on increasing these resources.

This issue proposes that we move the project cloning from the init container to a post start command in the container of the workspace where the IDE is injected.

This will also solve other tangential issues because we are completely removing the init container cloning the project

Acceptance criteria

  • Project cloning is moved to post start event in the main container of the workspace.
  • Successful cloning of project on workspace startup
  • Project should not be cloned again if it was successfully cloned and then the workspace was restarted.

Implementation plan

N.A.

Edited by Vishal Tak