Add k3d as a second cluster driver alongside Colima, enabling developers to use lightweight Kubernetes clusters via k3d instead of full VM-based solutions.
Refactor cluster configuration to support driver-specific settings using JSON schema oneOf validation. Each driver now has its own configuration section:
colima: keyk3d: keyReplace cluster.Status boolean fields (Running, Ready) with a State enum (StateStopped, StateStarting, StateNotReady, StateReady) to better represent cluster lifecycle. Remove driver-agnostic Memory/Cores fields from Status since these are now driver-specific.
Add separate integration tests for both drivers using build tags:
This allows developers to run integration tests only for the cluster driver they have installed, via new mise tasks: test:integration:colima and test:integration:k3d.
Technical changes:
Andrew Newdigate (dd137ea1) at 07 Feb 12:17
feat: Add k3d cluster driver support
Andrew Newdigate (faae1554) at 07 Feb 10:10
Andrew Newdigate (1415170a) at 07 Feb 10:10
Merge branch 'start' into 'main'
... and 10 more commits
This MR implements a complete cluster management system for Caproni with the Colima driver, comprehensive command suite (start, stop, status, destroy), and full test infrastructure including a mock driver for testing.
ProfileName configurationImplemented four core commands for cluster lifecycle management:
start - Start cluster and deploy GitLabstop - Stop the cluster and edit mode servicesstatus - Display cluster and service statusdestroy - Completely remove cluster and all dataAll commands:
colima list --json for reliabilityCreated a mock cluster driver for testing:
//go:build integration)-short flagAdded mise tasks for convenient test running:
mise run test:short - Unit tests only (no Colima required)mise run test:integration - Integration tests (requires Colima)mise run test - All testsAll error messages follow GitLab Go Guide conventions:
fmt.Errorf("loading configuration: %w", err)
result := executil.RunWithOptions(ctx, "colima", []string{"start"}, &executil.Options{
LogLevel: slog.LevelInfo,
StderrLogLevel: slog.LevelWarn,
})
Benefits:
func init() {
cluster.RegisterDriver("colima", func(profileName string) cluster.Manager {
return NewDriver(profileName)
})
}
Benefits:
cluster:
driver: colima
memory: 8GiB
cores: 4
repositories:
gitlab:
repository: https://gitlab.com/gitlab-org/gitlab.git
directory: ./gitlab/
type: app
app:
kubernetes_type: deployment
Andrew Newdigate (faae1554) at 07 Feb 10:04
Fix tparallel linter: move t.Parallel() before short check
Andrew Newdigate (57db6a8b) at 07 Feb 10:00
Add ProfileName configuration and mock driver support
Andrew Newdigate (8769edb0) at 07 Feb 07:02
Update Colima driver to use list command and add ReadStdout utility
Andrew Newdigate (bd7f142e) at 06 Feb 20:23
Fix error messages to comply with GitLab Go Guide
Andrew Newdigate (432989e7) at 06 Feb 19:56
Add Destroy method to cluster driver and destroy command
Andrew Newdigate (428232aa) at 06 Feb 19:39
Update Colima Status method to use JSON output
... and 2 more commits
Andrew Newdigate (33fb4bb4) at 06 Feb 15:20
Update golangci-lint config to use wsl_v5 instead of deprecated wsl
Andrew Newdigate (2d0be57e) at 06 Feb 15:07
Add cluster management with registry pattern and Colima driver
... and 2 more commits
Andrew Newdigate (a02daef8) at 06 Feb 14:55
Andrew Newdigate (c12aeadc) at 06 Feb 14:55
Merge branch 'config-parser' into 'main'
... and 2 more commits
Implements schema-driven configuration parsing with JSON schema validation. Configuration is loaded and validated lazily on first use with thread-safe caching for subsequent calls.
Key features:
Andrew Newdigate (a02daef8) at 06 Feb 14:32
Fix error messages to comply with Go style guide
This MR implements a complete cluster management system for Caproni with the Colima driver, comprehensive command suite (start, stop, status, destroy), and full test infrastructure including a mock driver for testing.
ProfileName configurationImplemented four core commands for cluster lifecycle management:
start - Start cluster and deploy GitLabstop - Stop the cluster and edit mode servicesstatus - Display cluster and service statusdestroy - Completely remove cluster and all dataAll commands:
colima list --json for reliabilityCreated a mock cluster driver for testing:
//go:build integration)-short flagAdded mise tasks for convenient test running:
mise run test:short - Unit tests only (no Colima required)mise run test:integration - Integration tests (requires Colima)mise run test - All testsAll error messages follow GitLab Go Guide conventions:
fmt.Errorf("loading configuration: %w", err)
result := executil.RunWithOptions(ctx, "colima", []string{"start"}, &executil.Options{
LogLevel: slog.LevelInfo,
StderrLogLevel: slog.LevelWarn,
})
Benefits:
func init() {
cluster.RegisterDriver("colima", func(profileName string) cluster.Manager {
return NewDriver(profileName)
})
}
Benefits:
cluster:
driver: colima
memory: 8GiB
cores: 4
repositories:
gitlab:
repository: https://gitlab.com/gitlab-org/gitlab.git
directory: ./gitlab/
type: app
app:
kubernetes_type: deployment
Andrew Newdigate (b5981943) at 06 Feb 14:10
Add cluster management with registry pattern and Colima driver
... and 1 more commit
Implements schema-driven configuration parsing with JSON schema validation. Configuration is loaded and validated lazily on first use with thread-safe caching for subsequent calls.
Key features: