cozystack icon indicating copy to clipboard operation
cozystack copied to clipboard

Consider replacing Makefiles with go binary

Open kvaps opened this issue 1 year ago • 0 comments

Our main engine is FluxCD, which everyone is satisfied with, as it handles its tasks excellently.

Roughly speaking, there are two tasks:

  1. 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.
  2. 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 Dockerfiles
    • make image - build the image and save the metadata of the built image and digest in values.yaml
    • make show - take values from fluxcd, and perform a helm template
    • make diff - take values from fluxcd and perform a helm diff, showing what will change
    • make 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

kvaps avatar Apr 12 '24 15:04 kvaps