cozystack
cozystack copied to clipboard
Consider replacing Makefiles with go binary
Our main engine is FluxCD, which everyone is satisfied with, as it handles its tasks excellently.
Roughly speaking, there are two tasks:
-
Bootstrap the initial cluster:
- Run migrations
- Create namespaces from core/platform as
helm template | kubectl apply -f - - Install fluxcd from core/fluxcd as
helm template | kubectl apply -f - - Install the CNI plugin from system/kube-ovn and system/cilium
- Continuously install core/platfom chart (for every 60 seconds) Then FluxCD handles everything else.
-
Provide a convenient interface for local development, where each application has a specific set of actions:
make update- downloads the latest chart sources from the upstream/updates Dockerfilesmake image- build the image and save the metadata of the built image and digest in values.yamlmake show- take values from fluxcd, and perform a helm templatemake diff- take values from fluxcd and perform a helm diff, showing what will changemake apply- take values from fluxcd, suspend the release, and perform a helm apply
Of course the second item can keep using Makefile that simple triggers a Go binary with the necessary parameters for show, diff and apply