Skip to content

Commit 187efaa

Browse files
authored
feat(output)!: default list-output changed from yaml to table
1 parent 54d3726 commit 187efaa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/kubernetes-mcp-server/cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func flagInit() {
118118
rootCmd.Flags().StringP("sse-base-url", "", "", "SSE public base URL to use when sending the endpoint message (e.g. https://example.com)")
119119
rootCmd.Flags().StringP("kubeconfig", "", "", "Path to the kubeconfig file to use for authentication")
120120
rootCmd.Flags().String("profile", "full", "MCP profile to use (one of: "+strings.Join(mcp.ProfileNames, ", ")+")")
121-
rootCmd.Flags().String("list-output", "yaml", "Output format for resource lists (one of: "+strings.Join(output.Names, ", ")+")")
121+
rootCmd.Flags().String("list-output", "table", "Output format for resource lists (one of: "+strings.Join(output.Names, ", ")+")")
122122
rootCmd.Flags().Bool("read-only", false, "If true, only tools annotated with readOnlyHint=true are exposed")
123123
rootCmd.Flags().Bool("disable-destructive", false, "If true, tools annotated with destructiveHint=true are disabled")
124124
_ = viper.BindPFlags(rootCmd.Flags())

pkg/kubernetes-mcp-server/cmd/root_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ func TestListOutput(t *testing.T) {
5252
t.Fatalf("Expected all available outputs, got %s %v", out, err)
5353
}
5454
})
55-
t.Run("default", func(t *testing.T) {
55+
t.Run("defaults to table", func(t *testing.T) {
5656
rootCmd.SetArgs([]string{"--version", "--log-level=1"})
5757
rootCmd.ResetFlags()
5858
flagInit()
5959
out, err := captureOutput(rootCmd.Execute)
60-
if !strings.Contains(out, "- ListOutput: yaml") {
61-
t.Fatalf("Expected list-output 'yaml', got %s %v", out, err)
60+
if !strings.Contains(out, "- ListOutput: table") {
61+
t.Fatalf("Expected list-output 'table', got %s %v", out, err)
6262
}
6363
})
6464
}

0 commit comments

Comments
 (0)