Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/kubernetes-mcp-server/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func flagInit() {
rootCmd.Flags().StringP("sse-base-url", "", "", "SSE public base URL to use when sending the endpoint message (e.g. https://example.com)")
rootCmd.Flags().StringP("kubeconfig", "", "", "Path to the kubeconfig file to use for authentication")
rootCmd.Flags().String("profile", "full", "MCP profile to use (one of: "+strings.Join(mcp.ProfileNames, ", ")+")")
rootCmd.Flags().String("list-output", "yaml", "Output format for resource lists (one of: "+strings.Join(output.Names, ", ")+")")
rootCmd.Flags().String("list-output", "table", "Output format for resource lists (one of: "+strings.Join(output.Names, ", ")+")")
rootCmd.Flags().Bool("read-only", false, "If true, only tools annotated with readOnlyHint=true are exposed")
rootCmd.Flags().Bool("disable-destructive", false, "If true, tools annotated with destructiveHint=true are disabled")
_ = viper.BindPFlags(rootCmd.Flags())
Expand Down
6 changes: 3 additions & 3 deletions pkg/kubernetes-mcp-server/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ func TestListOutput(t *testing.T) {
t.Fatalf("Expected all available outputs, got %s %v", out, err)
}
})
t.Run("default", func(t *testing.T) {
t.Run("defaults to table", func(t *testing.T) {
rootCmd.SetArgs([]string{"--version", "--log-level=1"})
rootCmd.ResetFlags()
flagInit()
out, err := captureOutput(rootCmd.Execute)
if !strings.Contains(out, "- ListOutput: yaml") {
t.Fatalf("Expected list-output 'yaml', got %s %v", out, err)
if !strings.Contains(out, "- ListOutput: table") {
t.Fatalf("Expected list-output 'table', got %s %v", out, err)
}
})
}
Expand Down
Loading