elotl / kip

Virtual-kubelet provider running pods in cloud instances
Apache License 2.0
223 stars 14 forks source link

Pass pod.elotl.co/ annotations through to itzo #178

Closed justnoise closed 3 years ago

justnoise commented 4 years ago

We want to allow annotations to change how itzo does things. Specifically we are interested in implementing this issue: https://github.com/elotl/itzo/issues/101

Here are some rough notes on how this can happen:

  1. Annotations are already copied from k8s pods to kip pods in pkg/server/convert.go:k8sToMilpaPod. A suggested name for a new annotation was image-overlay-rootfs and the value should be a bool-ish value. All that needs to happen on the kip side is that annotation needs to get sent to itzo.
  2. All pod creation/updates are sent to itzo in the api.PodParameters structure. Add an Annotations map[string]string to that structure
  3. In the PodController, the pod spec and other info is sent to Itzo in PodController.updatePodUnits(). Copy all pod.elotl.co/* pod annotations into the PodParameters that are sent to the itzo instance.
  4. Now itzo gets all the pod annotations.