Skip to content

Commit a3cc1b0

Browse files
committed
fix: deprecate get-telemetry , envoy-filters
1 parent ee79fe5 commit a3cc1b0

File tree

4 files changed

+3
-79
lines changed

4 files changed

+3
-79
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ extensions:
159159

160160

161161
### ⚙️ Configuration Resources
162-
- `get-envoy-filters` - List Envoy Filters in a namespace
163-
- `get-telemetry` - List Telemetry configurations in a namespace
164162
- `get-istio-config` - Get comprehensive Istio configuration summary
165163

166164
### 🔍 Proxy Configuration

pkg/istio/istio.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -157,37 +157,6 @@ func (i *Istio) GetServiceEntries(ctx context.Context, namespace string) (string
157157
}
158158

159159
// Configuration resources
160-
func (i *Istio) GetEnvoyFilters(ctx context.Context, namespace string) (string, error) {
161-
efList, err := i.istioClient.NetworkingV1alpha3().EnvoyFilters(namespace).List(ctx, metav1.ListOptions{})
162-
if err != nil {
163-
return "", fmt.Errorf("failed to list envoy filters: %w", err)
164-
}
165-
166-
result := fmt.Sprintf("Found %d Envoy Filters in namespace '%s':\n", len(efList.Items), namespace)
167-
for _, ef := range efList.Items {
168-
result += fmt.Sprintf("- %s\n", ef.Name)
169-
if ef.Spec.WorkloadSelector != nil && ef.Spec.WorkloadSelector.Labels != nil {
170-
result += fmt.Sprintf(" Workload Selector: %v\n", ef.Spec.WorkloadSelector.Labels)
171-
}
172-
}
173-
return result, nil
174-
}
175-
176-
func (i *Istio) GetTelemetries(ctx context.Context, namespace string) (string, error) {
177-
telList, err := i.istioClient.TelemetryV1alpha1().Telemetries(namespace).List(ctx, metav1.ListOptions{})
178-
if err != nil {
179-
return "", fmt.Errorf("failed to list telemetries: %w", err)
180-
}
181-
182-
result := fmt.Sprintf("Found %d Telemetry configurations in namespace '%s':\n", len(telList.Items), namespace)
183-
for _, tel := range telList.Items {
184-
result += fmt.Sprintf("- %s\n", tel.Name)
185-
if tel.Spec.Selector != nil && tel.Spec.Selector.MatchLabels != nil {
186-
result += fmt.Sprintf(" Selector: %v\n", tel.Spec.Selector.MatchLabels)
187-
}
188-
}
189-
return result, nil
190-
}
191160

192161
// CheckExternalDependencyAvailability checks if an external dependency is properly configured and accessible for a service
193162
func (i *Istio) CheckExternalDependencyAvailability(ctx context.Context, serviceName, externalHost, namespace string) (string, error) {

pkg/mcp/profile.go

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -132,30 +132,6 @@ func (s *Server) initConfigurationTools() []server.ServerTool {
132132
),
133133
Handler: s.discoverIstioNamespaces,
134134
},
135-
{
136-
Tool: mcp.NewTool("get-envoy-filters",
137-
mcp.WithDescription("Get Istio Envoy Filters from any namespace. Envoy Filters allow custom configuration of Envoy proxy behavior, including custom filters, listeners, and clusters. Use this to inspect advanced Istio service mesh configurations."),
138-
mcp.WithString("namespace",
139-
mcp.Description("Namespace to query (defaults to 'default'). Custom Envoy configurations may be applied to specific namespaces or workloads."),
140-
),
141-
mcp.WithTitleAnnotation("Istio: Envoy Filters"),
142-
mcp.WithReadOnlyHintAnnotation(true),
143-
mcp.WithDestructiveHintAnnotation(false),
144-
),
145-
Handler: s.getEnvoyFilters,
146-
},
147-
{
148-
Tool: mcp.NewTool("get-telemetry",
149-
mcp.WithDescription("Get Istio Telemetry configurations from any namespace. Telemetry policies define observability settings including metrics, tracing, and logging for the service mesh. Use this to inspect monitoring and observability configurations."),
150-
mcp.WithString("namespace",
151-
mcp.Description("Namespace to query (defaults to 'default'). Telemetry policies may be namespace-specific or inherited from mesh-wide settings."),
152-
),
153-
mcp.WithTitleAnnotation("Istio: Telemetry"),
154-
mcp.WithReadOnlyHintAnnotation(true),
155-
mcp.WithDestructiveHintAnnotation(false),
156-
),
157-
Handler: s.getTelemetries,
158-
},
159135

160136
{
161137
Tool: mcp.NewTool("check-external-dependency-availability",
@@ -375,23 +351,6 @@ func (s *Server) listServiceMeshHosts(ctx context.Context, ctr mcp.CallToolReque
375351
// Handler methods for security tools
376352

377353
// Handler methods for configuration tools
378-
func (s *Server) getEnvoyFilters(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
379-
namespace := "default"
380-
if ns := ctr.GetArguments()["namespace"]; ns != nil {
381-
namespace = ns.(string)
382-
}
383-
content, err := s.i.GetEnvoyFilters(ctx, namespace)
384-
return NewTextResult(content, err), nil
385-
}
386-
387-
func (s *Server) getTelemetries(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {
388-
namespace := "default"
389-
if ns := ctr.GetArguments()["namespace"]; ns != nil {
390-
namespace = ns.(string)
391-
}
392-
content, err := s.i.GetTelemetries(ctx, namespace)
393-
return NewTextResult(content, err), nil
394-
}
395354

396355
// Handler method for external dependency availability check
397356
func (s *Server) checkExternalDependencyAvailability(ctx context.Context, ctr mcp.CallToolRequest) (*mcp.CallToolResult, error) {

pkg/mcp/profile_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,16 @@ func TestFullProfile(t *testing.T) {
8585

8686
// Check that we have tools from different categories
8787
categories := map[string]bool{
88-
"networking": false,
89-
"configuration": false,
90-
"proxy-config": false,
88+
"networking": false,
89+
"proxy-config": false,
9190
}
9291

9392
for _, tool := range tools {
9493
toolName := tool.Tool.Name
9594
switch {
9695
case toolName == "get-virtual-service" || toolName == "get-destination-rules":
9796
categories["networking"] = true
98-
case toolName == "get-envoy-filters" || toolName == "get-telemetry":
99-
categories["configuration"] = true
97+
// No configuration tools currently available
10098
case toolName == "get-proxy-clusters" || toolName == "get-proxy-listeners" || toolName == "get-proxy-routes":
10199
categories["proxy-config"] = true
102100
}

0 commit comments

Comments
 (0)