Repository navigation
feat: make demo mode opt-in and add a "No cluster" state - #2
Merged
Merged
Conversation
…etween offline testing and live connections
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.
What
Thanks @clamshell2000 for pointing out the confusion: with no cluster,
k10sopened straight onto mock data — a laptop with no kubeconfig showed 3 nodes, 40 pods and a CrashLoopBackOff that existed nowhere, labelled only by a "mock mode" line in the status bar. So the demo is now its own thing.Now:
k10s→ real cluster only. No cluster → No cluster panel.k10s demo.Changes
Demo as a context (
domain.DemoContext=k10s-demo)k10s demo/--demo→ boots on demo context/demo→ switch from anywhere:ctxalways lists it, labelledk10s demo · sample data+ legendDEMOmarker in header while activeNo cluster state (
internal/ui/nocluster.go)store.Ping()now gates it)noClusterReason()trims client-go's multi-sentence errors to the useful first clauserretry ·:ctxpick another ·/setupconnect guideCommands
+/setup,+/demo,:mouse→/mouse(k10s's own, not the cluster's)Docs
docs/cluster-setup.md(kubectl install + kubeconfig), linked from the panel,/setup, and usage text — one canonical URL constantk10s demoTests
internal/ui/demo_test.go(246),internal/ui/nocluster_test.go(193).Reported by @clamshell2000.