Skip to content

Conversation

@enrichman
Copy link
Collaborator

@enrichman enrichman commented Nov 12, 2025

Fix #483 #504

This PR adds cluster details in cli during cluster creation:

It also silence the help/usage when an error occurs and it removes the not yet implemented static persistence type from the help.

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 74.46809% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.73%. Comparing base (7dc4726) to head (35dc93b).

Files with missing lines Patch % Lines
cli/cmds/cluster_create.go 73.17% 5 Missing and 6 partials ⚠️
cli/cmds/cluster_create_flags.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #562      +/-   ##
==========================================
+ Coverage   59.71%   59.73%   +0.02%     
==========================================
  Files          56       56              
  Lines        5158     5198      +40     
==========================================
+ Hits         3080     3105      +25     
- Misses       1798     1806       +8     
- Partials      280      287       +7     
Flag Coverage Δ
cli 53.46% <74.46%> (-0.22%) ⬇️
controller 57.87% <0.00%> (-0.61%) ⬇️
e2e 57.87% <0.00%> (-0.61%) ⬇️
unit 36.71% <48.93%> (-4.75%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@enrichman enrichman linked an issue Nov 12, 2025 that may be closed by this pull request
@enrichman enrichman self-assigned this Nov 13, 2025
Copy link
Collaborator

@jp-gouin jp-gouin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, from a validation perspective 🚀

./k3kcli cluster create test-sharedmode
warning: GOCOVERDIR not set, no coverage data emitted
INFO[0000] Creating namespace [k3k-test-sharedmode]
INFO[0000] Creating cluster [test-sharedmode] in namespace [k3k-test-sharedmode]
INFO[0001] Cluster details:
  Mode: shared
  Servers: 1
  Version: v1.33.5-k3s1 (Host: v1.33.5-k3s1)
  Persistence:
    Type: dynamic
    Size: 2G
INFO[0001] Waiting for cluster to be available..
INFO[0081] Extracting Kubeconfig for [test-sharedmode] cluster
INFO[0081] certificate CN=system:admin,O=system:masters signed by CN=k3s-client-ca@1763025553: notBefore=2025-11-13 09:19:13 +0000 UTC notAfter=2026-11-13 09:20:20 +0000 UTC
INFO[0081] You can start using the cluster with:

	export KUBECONFIG=...
	kubectl cluster-info

@enrichman enrichman requested a review from bigkevmcd November 13, 2025 15:50
@enrichman enrichman merged commit d0e50a5 into rancher:main Nov 14, 2025
9 checks passed
@enrichman enrichman deleted the 483-cluster-details branch November 14, 2025 11:53
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.

Remove static reference [CLI] add type of cluster during creation

5 participants