daytona icon indicating copy to clipboard operation
daytona copied to clipboard

Support copying binary from init container

Open josephlewis42 opened this issue 1 year ago • 0 comments

It would be great if a platform was able to inject an always up to date version of Daytona into arbitrary K8s workloads.

A common way to do this in the K8s world is to create a mutating admission webhook that can rewrite a pod to do the following:

  1. Inject an initContainer and a shared memory volume between the initContainer and the other containers.
  2. Make the binary in the init container copy itself to the shared volume.
  3. Rewrite the command on the application containers to execute the binary that was copied to the shared volume.

If Daytona supported a flag like --copy-to that would allow Daytona to copy itself to a destination then it would be possible to do the above while still using a feature like --secret-env/--entrypoint.

josephlewis42 avatar Feb 09 '24 23:02 josephlewis42