Skip to content

Draft: Add basic devspace config for runner

What does this merge request do and why?

This is an early draft of how DevSpace integration for satellite projects could look like.

This would allow us to deploy a subset of our services into an arbitrary K8S cluster.

How to set up and validate locally

  1. Install K3D (or minikube)
  2. Run k3d cluster create gdk-cluster --k3s-arg "--disable=traefik@server:0" or create a minikube cluster.
  3. Register a runner, as per the documentation
  4. Run gdk config set kubernetes.enabled true (Maybe we don't need this step in the future?)
  5. Run gdk config set runner.token with your token
  6. Run gdk config set runner.enabled true
  7. Run gdk config set runner.install_mode kubernetes
  8. Run gdk config set kubernetes.context with a suitable value from the lists of contexts in kubectl config get-contexts . Minikube and K3D should both have set up such a context.
  9. Run gdk reconfigure && gdk restart runner
  10. Run gdk tail runner

Mind the following current limitations:

  1. The service will enter a kind of restart loop, if the pod restarts frequently (or an image can't be pulled for whatever reason). This is, because we attach to the pod's logs to have something "in the foreground", to make runit happy.
  2. runit has no idea how to correctly terminate a pod. gdk stop runner will not stop it. It will only stop the foreground process.
  3. In order to really stop it: gdk stop runner; DEVSPACE_CONFIG=devspace/runner.yml devspace purge

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This MR references an issue describing the change.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.

Merge request reports

Loading