Skip to content

feat: Phase 1 — Core Engine#26

Merged
y0s3ph merged 4 commits into
mainfrom
feat/phase-1-core-engine
Mar 11, 2026
Merged

feat: Phase 1 — Core Engine#26
y0s3ph merged 4 commits into
mainfrom
feat/phase-1-core-engine

Conversation

@y0s3ph

@y0s3ph y0s3ph commented Mar 11, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the three core engine components that are prerequisites for all future phases:

  • Helm SDK Installer (internal/engine/helm.go) — Full Installer interface implementation using Helm Go SDK. Supports install, upgrade, uninstall, status checks, and InstallOrUpgrade convenience method. Charts can be loaded from embedded fs.FS (extracted to temp dir at runtime) or from filesystem paths. Includes atomic upgrades with rollback, dry-run support, and automatic namespace creation.

  • Preflight Checks (internal/preflight/) — Four automated checks that run before installation:

    • Cluster reachability and kubeconfig validation
    • Kubernetes version compatibility (>= 1.25, warning for untested versions > 1.32)
    • Allocatable CPU/memory vs per-mode minimum requirements
    • StorageClass availability with default class detection
    • Bypassable with --skip-preflight flag
  • Configuration System (internal/config/config.go) — Extended config struct with per-component overrides (replicas, storage, retention), ingress configuration, OTel Collector mode. Auto-discovers .k8scope.yaml in current directory or $HOME. Merge priority: CLI flags > config file > mode defaults.

Changes

File What
internal/engine/helm.go Complete HelmInstaller implementation
internal/preflight/*.go 4 preflight checkers + runner
internal/config/config.go Extended config with auto-discovery
internal/cli/install.go Preflight integration + --skip-preflight
README.md Updated roadmap + full config example

Test plan

  • go build ./cmd/k8scope compiles cleanly
  • go vet ./... passes
  • k8scope install --mode startup --dry-run --skip-preflight shows correct plan
  • k8scope install --mode production --dry-run --skip-preflight shows HA config
  • k8scope version works
  • Preflight checks validated against a real Kind cluster (to be covered by E2E test suite with Kind for startup mode #11)

Closes #1, closes #2, closes #3

y0s3ph added 4 commits March 11, 2026 12:12
- Helm SDK installer engine with install, upgrade, uninstall, status,
  and InstallOrUpgrade operations using embedded chart FS support
- Preflight checks: cluster connectivity, Kubernetes version
  compatibility (>=1.25), allocatable resources, and StorageClass
  availability with per-mode resource requirements
- Extended configuration with full component overrides, ingress config,
  auto-discovery of config files, and CLI flag merge semantics
- Install command now runs preflight checks with --skip-preflight flag

Closes #1, closes #2, closes #3
Helm SDK v3.20.0 requires Go 1.25+. Update all workflows to read
the Go version from go.mod instead of hardcoding 1.23. Also bump
golangci-lint-action to v7 for Go 1.25 compatibility.
The .gitignore pattern 'k8scope' was matching the cmd/k8scope/
directory in addition to the binary. Changed to '/k8scope' to
only ignore the binary at the repo root.
Explicitly discard return values from fmt.Fprintf, fmt.Fprintln,
fmt.Sscanf, tabwriter.Flush, and os.RemoveAll where errors are
non-actionable in CLI output and cleanup paths.
@y0s3ph y0s3ph self-assigned this Mar 11, 2026
@y0s3ph y0s3ph merged commit 3722864 into main Mar 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration file loading with CLI flag override Implement preflight checks before installation Implement Helm SDK installer engine

1 participant