cruise-automation / daytona

A Vault client, but for containers and servers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support copying binary from init container

josephlewis42 opened this issue · 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.