Kubernetes ConfigMap Support
To maintain the configuration of an application which is deployed inside a Kubernetes cluster, a recommended method is it to use ConfigMap. To consume this configuration, we can use the volume plugin, but the plugin mounts the ConfigMap as read-only, and the runner is storing its state inside the configuration file, so the current code fails with this approach.
So, to support ConfigMap, I can think of 3 different approaches:
- Supporting multiple config files, one required read-write file and optional files where the runner doesn't write on them.
- An abstraction layer for working with configuration, refactoring the current implementation as the file-based config driver, and then adding a new one; k8s config driver (probably through client-go)
- Separating the state (parts which are written by the runner) from configuration, and creating an abstraction layer for that. Again we can have have multiple drivers for querying and modifying the state: file, sql, k8s, etcd, ...
Which of these approaches you believe is more suitable for the current state of the runner? I'm interested to work on it and to prepare an MR to make the runner more Kubernetes-friendly.