Skip to content

Commit 68e2124

Browse files
committed
fix: remove analyze tool
1 parent e9017ee commit 68e2124

File tree

4 files changed

+4
-39
lines changed

4 files changed

+4
-39
lines changed

PROXY_CONFIG.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ The Istio MCP Server supports these proxy configuration tools:
1717
- **get-proxy-bootstrap**: Get Envoy bootstrap configuration from a pod
1818
- **get-proxy-config-dump**: Get full Envoy configuration dump from a pod
1919
- **get-proxy-status**: Get proxy status information for all pods or a specific pod
20-
- **get-istio-analyze**: Analyze Istio configuration and report potential issues
20+
2121

2222
## Implementation Details
2323

24-
- Uses `istioctl proxy-config` commands under the hood (and `istioctl analyze` for configuration analysis)
24+
- Uses `istioctl proxy-config` commands under the hood
2525
- Requires `istioctl` to be installed on the system
2626
- Returns JSON formatted output for easy parsing
2727
- Includes proper error handling and timeouts
@@ -31,7 +31,7 @@ The Istio MCP Server supports these proxy configuration tools:
3131

3232
Each tool requires:
3333
- `namespace` (optional, defaults to 'default')
34-
- `pod` (required for most tools, except `get-proxy-status` and `get-istio-analyze`)
34+
- `pod` (required for most tools, except `get-proxy-status`)
3535

3636
### Examples
3737

@@ -51,11 +51,7 @@ get-proxy-status --namespace default
5151
# Get proxy status for a specific pod
5252
get-proxy-status --namespace default --pod my-app-pod
5353

54-
# Analyze Istio configuration for a specific namespace
55-
get-istio-analyze --namespace default
5654

57-
# Analyze Istio configuration for the entire cluster
58-
get-istio-analyze
5955
```
6056

6157
## Prerequisites

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require (
99
github.com/spf13/viper v1.20.1
1010
golang.org/x/net v0.41.0
1111
istio.io/client-go v1.25.1
12+
k8s.io/api v0.33.1
1213
k8s.io/apimachinery v0.33.1
1314
k8s.io/client-go v0.33.1
1415
k8s.io/klog/v2 v2.130.1
@@ -59,7 +60,6 @@ require (
5960
gopkg.in/inf.v0 v0.9.1 // indirect
6061
gopkg.in/yaml.v3 v3.0.1 // indirect
6162
istio.io/api v1.25.1 // indirect
62-
k8s.io/api v0.33.1 // indirect
6363
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
6464
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
6565
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect

pkg/istio/proxy_config.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ func (p *ProxyConfigClient) GetProxyStatusForPod(ctx context.Context, namespace,
6868
return p.execIstioctl(ctx, "proxy-status", fmt.Sprintf("%s.%s", podName, namespace))
6969
}
7070

71-
// GetAnalyze performs Istio configuration analysis and reports potential issues
72-
func (p *ProxyConfigClient) GetAnalyze(ctx context.Context, namespace string) (string, error) {
73-
if namespace != "" {
74-
return p.execIstioctl(ctx, "analyze", "-n", namespace)
75-
}
76-
return p.execIstioctl(ctx, "analyze")
77-
}
78-
7971
// execIstioctl executes istioctl commands with proper error handling and timeout
8072
func (p *ProxyConfigClient) execIstioctl(ctx context.Context, args ...string) (string, error) {
8173
// Create context with timeout

pkg/mcp/profile.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -354,18 +354,6 @@ func (s *Server) initProxyConfigTools() []server.ServerTool {
354354
),
355355
Handler: s.getProxyStatus,
356356
},
357-
{
358-
Tool: mcp.NewTool("get-istio-analyze",
359-
mcp.WithDescription("Analyze Istio configuration and report potential issues, misconfigurations, and best practice violations. This tool runs 'istioctl analyze' to provide comprehensive analysis of your Istio service mesh configuration."),
360-
mcp.WithString("namespace",
361-
mcp.Description("Namespace to analyze (optional). If specified, analyzes only the specified namespace. If not provided, analyzes the entire cluster."),
362-
),
363-
mcp.WithTitleAnnotation("Istio: Configuration Analysis"),
364-
mcp.WithReadOnlyHintAnnotation(true),
365-
mcp.WithDestructiveHintAnnotation(false),
366-
),
367-
Handler: s.getIstioAnalyze,
368-
},
369357
}
370358
}
371359

@@ -607,17 +595,6 @@ func (s *Server) getProxyStatus(ctx context.Context, ctr mcp.CallToolRequest) (*
607595
return NewTextResult(content, err), nil
608596
}
609597

610-
// getIstioAnalyze performs Istio configuration analysis
611-
func (s *Server) getIstioAnalyze(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
612-
namespace := ""
613-
if ns := ctr.GetArguments()["namespace"]; ns != nil {
614-
namespace = ns.(string)
615-
}
616-
617-
content, err := s.i.ProxyConfig.GetAnalyze(ctx, namespace)
618-
return NewTextResult(content, err), nil
619-
}
620-
621598
// Handler implementations (add to profile.go)
622599
func (s *Server) getServices(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
623600
namespace := "default"

0 commit comments

Comments
 (0)