tern icon indicating copy to clipboard operation
tern copied to clipboard

Enable Tern to run on Kubernetes

Open rnjudge opened this issue 2 years ago • 1 comments

Describe the Feature Tern can be package as a container. Next, let's make it run on Kubernetes so users can deploy and utilize Tern at scale or as part of their CI/CD pipelines.

Implementation Changes There are two approaches to running Tern on Kubernetes:

  1. Run Tern jobs as ephemeral containers each with the job of scanning one container image.

  2. Run Tern in some number of persistent containers running as a service in a K8s cluster, scaled to the resource environment. Something calls out to the “Tern cluster” via its APIs and asks for work (the 100 containers names for scanning). Tern figures out how to load balance those across its available instances, perhaps with Kubernetes spinning up more worker instances of Tern container if resources are available or the quality of the Tern service gets to low.

We will start by first implementing the first approach - running Tern as a container on Kubernetes. The second approach will take more time to thoughtfully design (and might possibly overlap with https://github.com/tern-tools/tern/issues/1096).

rnjudge avatar Jan 28 '22 19:01 rnjudge

On further investigation, it seems like Tern can run on Kubernetes as of release 2.9.1, but requires volume mounts. Therefore, we will just add some documentation to the README explaining how to do that with minikube.

nishakm avatar Feb 01 '22 23:02 nishakm