feat(stack): pluggable backend system with native k3s support#135
Open
bussyjd wants to merge 1 commit intointegration-okr-1from
Open
feat(stack): pluggable backend system with native k3s support#135bussyjd wants to merge 1 commit intointegration-okr-1from
bussyjd wants to merge 1 commit intointegration-okr-1from
Conversation
Introduce a Backend interface that abstracts cluster lifecycle management, enabling both k3d (Docker-based, default) and k3s (native bare-metal) backends. This is a prerequisite for TEE/Confidential Computing workloads which require direct hardware access that k3d cannot provide. Changes: - Add Backend interface (Init, Up, Down, Destroy, IsRunning, DataDir) - Extract k3d logic into K3dBackend with backward-compatible fallback - Add K3sBackend with sudo process management, PID tracking, and API server readiness checks - Convert helmfile.yaml to helmfile.yaml.gotmpl using env vars instead of .Values references (fixes first-pass template rendering) - Fix eRPC secretEnv type mismatch (map vs string for b64enc) - Fix obol-frontend escaped quotes in gotmpl expressions - Add KUBECONFIG env var to helmfile command for hook compatibility - Add 26 unit tests and 10 integration test scenarios Closes #134
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backendinterface that abstracts cluster lifecycle, enabling both k3d (default) and native k3s backendssecretEnvtype mismatch, obol-frontend escaped quotes,.Values.*unavailable during gotmpl first-pass rendering)What changed
BackendwithInit,Up,Down,Destroy,IsRunning,DataDir— k3d extracted intoK3dBackend, newK3sBackendaddedsudo kill -0liveness checks, process group signals,k3s-killall.shcleanup, API server readiness pollinghelmfile.yaml→helmfile.yaml.gotmpl, env vars replace.Values.*references, KUBECONFIG propagated to hookssecretEnvchanged from nested map to{}, secret injected viaextraEnvwithvalueFrom.secretKeyRef{{ printf \"...\" }}with direct interpolation and single-quotedenvcalls//go:build integrationTest results
-raceTest plan
go test -race ./internal/stack/)stack init --backend k3s→stack up→ full helmfile deploystack down→stack uprestart cyclestack purge --forcefull cleanupCloses #134