Skip to content

feat(cli): Added Slice Health Status Functionality#96

Open
AyushSriv06 wants to merge 1 commit intokubeslice:masterfrom
AyushSriv06:slice-health
Open

feat(cli): Added Slice Health Status Functionality#96
AyushSriv06 wants to merge 1 commit intokubeslice:masterfrom
AyushSriv06:slice-health

Conversation

@AyushSriv06
Copy link
Copy Markdown

fix #66

Add show-health command to kubeslice-cli

Summary

Implements kubeslice-cli show-health slice <SLICE-NAME> command to display KubeSlice slice health status.

Changes

  • Added cmd/show-health.go - Main command implementation with Cobra
  • Enhanced pkg/slice.go - Added ShowSliceHealth() and ShowAllSliceHealth() functions
  • Updated pkg/internal/slice-config.go - Added JSON parsing and health status display
  • Created doc/kubeslice-cli_show-health.md - Complete documentation
  • Updated README.md - Added new command to available commands list

Testing

Tested on GKE cluster with KubeSlice 1.4.0 - Command successfully connects to cluster, parses JSON output, and displays health status. All error handling scenarios tested and working correctly.

Usage

kubeslice-cli show-health slice my-slice -n kubeslice-demo
kubeslice-cli show-health slice -A -n kubeslice-demo

Signed-off-by: Ayush Srivastava <ayushsrisks@gmail.com>
@pnavali
Copy link
Copy Markdown

pnavali commented Aug 20, 2025

@gourishkb @bharath-avesha please review

@gourishkb
Copy link
Copy Markdown
Collaborator

Hey @AyushSriv06 can you please attach the command output screenshot ?

Comment thread cmd/show-health.go
)

var showHealthCmd = &cobra.Command{
Use: "show-health",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is another PR open for cluster health status, can you make this more specific with something like "show-slice-health" ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

okay, i will do that!

Comment thread cmd/show-health.go
var showHealthCmd = &cobra.Command{
Use: "show-health",
Aliases: []string{"health"},
Short: "Show health status of KubeSlice resources.",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"Show health status of Slice Resources"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

okay

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.

Feature: Show slice health status

3 participants