Skip to content

fix: isolate e2e commands to k3d cluster only - #19

Merged
tonyferrell merged 1 commit into
mainfrom
fix/e2e-context-safety
Mar 28, 2026
Merged

fix: isolate e2e commands to k3d cluster only#19
tonyferrell merged 1 commit into
mainfrom
fix/e2e-context-safety

Conversation

@tonyferrell

Copy link
Copy Markdown
Contributor

Summary

Critical safety fix: opdev e2e commands previously used the default kubectl context, meaning they could accidentally target production if that was the active context.

Now:

  • All kubectl/helm calls use a dedicated kubeconfig at ~/.k3d/kubeconfig-ownpulse-local.yaml
  • status, build, seed refuse to run if the k3d cluster doesn't exist
  • up creates the cluster and writes its own kubeconfig
  • teardown deletes both the cluster and its kubeconfig
  • The default kubectl context is never read or modified

Test plan

  • go vet / go test pass
  • opdev e2e status with no k3d cluster returns error: "not running — run 'opdev e2e up' first"
  • opdev e2e --dry-run still works (skips cluster check)

🤖 Generated with Claude Code

…l context

All kubectl and helm calls now use a dedicated kubeconfig at
~/.k3d/kubeconfig-ownpulse-local.yaml instead of the default context.
Commands other than 'up' refuse to run if the k3d cluster doesn't exist.

This prevents accidental deployments to production when the default
kubectl context points to a real cluster.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tonyferrell
tonyferrell merged commit 7016cfa into main Mar 28, 2026
1 check passed
@tonyferrell
tonyferrell deleted the fix/e2e-context-safety branch March 28, 2026 07:14
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.

1 participant