Skip to content

Commit 8155183

Browse files
Merge pull request #158 from matzew/disable_observability_tooling
NO-JIRA: Disable the observability toolset by 'default'
2 parents c8655b7 + aeb82e3 commit 8155183

7 files changed

Lines changed: 10 additions & 458 deletions

pkg/config/config_default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
func Default() *StaticConfig {
1010
defaultConfig := StaticConfig{
1111
ListOutput: "table",
12-
Toolsets: []string{"core", "config", "helm", "observability"},
12+
Toolsets: []string{"core", "config", "helm"},
1313
}
1414
overrides := defaultOverrides()
1515
mergedConfig := mergeConfig(defaultConfig, overrides)

pkg/config/config_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ func (s *ConfigSuite) TestReadConfigValidPreservesDefaultsForMissingFields() {
247247
s.Equalf("table", config.ListOutput, "Expected ListOutput to be table, got %s", config.ListOutput)
248248
})
249249
s.Run("toolsets defaulted correctly", func() {
250-
s.Require().Lenf(config.Toolsets, 4, "Expected 4 toolsets, got %d", len(config.Toolsets))
251-
for _, toolset := range []string{"core", "config", "helm", "observability"} {
250+
s.Require().Lenf(config.Toolsets, 3, "Expected 3 toolsets, got %d", len(config.Toolsets))
251+
for _, toolset := range []string{"core", "config", "helm"} {
252252
s.Containsf(config.Toolsets, toolset, "Expected toolsets to contain %s", toolset)
253253
}
254254
})
@@ -568,7 +568,7 @@ func (s *ConfigSuite) TestStandaloneConfigDirPreservesDefaults() {
568568
s.Run("preserves default values", func() {
569569
s.Equal("9999", config.Port, "port should be from drop-in")
570570
s.Equal("table", config.ListOutput, "list_output should be default")
571-
s.Equal([]string{"core", "config", "helm", "observability"}, config.Toolsets, "toolsets should be default")
571+
s.Equal([]string{"core", "config", "helm"}, config.Toolsets, "toolsets should be default")
572572
})
573573
}
574574

@@ -585,7 +585,7 @@ func (s *ConfigSuite) TestStandaloneConfigDirEmpty() {
585585

586586
s.Run("returns defaults for empty directory", func() {
587587
s.Equal("table", config.ListOutput, "list_output should be default")
588-
s.Equal([]string{"core", "config", "helm", "observability"}, config.Toolsets, "toolsets should be default")
588+
s.Equal([]string{"core", "config", "helm"}, config.Toolsets, "toolsets should be default")
589589
})
590590
}
591591

@@ -914,7 +914,7 @@ func (s *ConfigSuite) TestBothConfigAndConfigDirEmpty() {
914914

915915
s.Run("returns default configuration", func() {
916916
s.Equal("table", config.ListOutput)
917-
s.Equal([]string{"core", "config", "helm", "observability"}, config.Toolsets)
917+
s.Equal([]string{"core", "config", "helm"}, config.Toolsets)
918918
s.Equal(0, config.LogLevel)
919919
})
920920
}
@@ -1034,7 +1034,7 @@ func (s *ConfigSuite) TestEmptyConfigFile() {
10341034
s.Equal("9999", config.Port, "port should be from drop-in")
10351035
// Defaults should still be applied for unset values
10361036
s.Equal("table", config.ListOutput, "list_output should be default")
1037-
s.Equal([]string{"core", "config", "helm", "observability"}, config.Toolsets, "toolsets should be default")
1037+
s.Equal([]string{"core", "config", "helm"}, config.Toolsets, "toolsets should be default")
10381038
})
10391039
}
10401040

pkg/mcp/testdata/toolsets-full-tools-multicluster-enum.json

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,4 @@
11
[
2-
{
3-
"annotations": {
4-
"destructiveHint": false,
5-
"idempotentHint": true,
6-
"openWorldHint": true,
7-
"readOnlyHint": true,
8-
"title": "Alertmanager: Get Alerts"
9-
},
10-
"description": "Query active and pending alerts from the cluster's Alertmanager.\nUseful for monitoring cluster health, detecting issues, and incident response.\n\nReturns alerts with their labels, annotations, status, and timing information.\nCan filter by active/silenced/inhibited state.\n\nCommon use cases:\n- Check for critical alerts affecting the cluster\n- Monitor for specific alert types (e.g., high CPU, disk pressure)\n- Verify alert silences are working correctly",
11-
"inputSchema": {
12-
"properties": {
13-
"active": {
14-
"default": true,
15-
"description": "Filter for active (firing) alerts. Default: true",
16-
"type": "boolean"
17-
},
18-
"context": {
19-
"description": "Optional parameter selecting which context to run the tool in. Defaults to fake-context if not set",
20-
"enum": [
21-
"extra-cluster",
22-
"fake-context"
23-
],
24-
"type": "string"
25-
},
26-
"filter": {
27-
"description": "Optional filter using Alertmanager filter syntax. Examples: 'alertname=Watchdog', 'severity=critical', 'namespace=openshift-monitoring'",
28-
"type": "string"
29-
},
30-
"inhibited": {
31-
"default": false,
32-
"description": "Include inhibited alerts in the results. Default: false",
33-
"type": "boolean"
34-
},
35-
"silenced": {
36-
"default": false,
37-
"description": "Include silenced alerts in the results. Default: false",
38-
"type": "boolean"
39-
}
40-
},
41-
"type": "object"
42-
},
43-
"name": "alertmanager_alerts",
44-
"title": "Alertmanager: Get Alerts"
45-
},
462
{
473
"annotations": {
484
"destructiveHint": false,
@@ -673,89 +629,6 @@
673629
"name": "pods_top",
674630
"title": "Pods: Top"
675631
},
676-
{
677-
"annotations": {
678-
"destructiveHint": false,
679-
"idempotentHint": true,
680-
"openWorldHint": true,
681-
"readOnlyHint": true,
682-
"title": "Prometheus: Instant Query"
683-
},
684-
"description": "Execute an instant PromQL query against the cluster's Thanos Querier.\nReturns current metric values at the specified time (or current time if not specified).\nUse this for point-in-time metric values.\n\nCommon queries:\n- up{job=\"apiserver\"} - Check if API server is up\n- sum by(namespace) (container_memory_usage_bytes) - Memory usage by namespace\n- rate(container_cpu_usage_seconds_total[5m]) - CPU usage rate\n- kube_pod_status_phase{phase=\"Running\"} - Running pods count",
685-
"inputSchema": {
686-
"properties": {
687-
"context": {
688-
"description": "Optional parameter selecting which context to run the tool in. Defaults to fake-context if not set",
689-
"enum": [
690-
"extra-cluster",
691-
"fake-context"
692-
],
693-
"type": "string"
694-
},
695-
"query": {
696-
"description": "PromQL query string (e.g., 'up{job=\"apiserver\"}', 'sum by(namespace) (container_memory_usage_bytes)')",
697-
"type": "string"
698-
},
699-
"time": {
700-
"description": "Optional evaluation timestamp. Accepts RFC3339 format (e.g., '2024-01-01T12:00:00Z') or Unix timestamp. If not provided, uses current time.",
701-
"type": "string"
702-
}
703-
},
704-
"required": [
705-
"query"
706-
],
707-
"type": "object"
708-
},
709-
"name": "prometheus_query",
710-
"title": "Prometheus: Instant Query"
711-
},
712-
{
713-
"annotations": {
714-
"destructiveHint": false,
715-
"idempotentHint": true,
716-
"openWorldHint": true,
717-
"readOnlyHint": true,
718-
"title": "Prometheus: Range Query"
719-
},
720-
"description": "Execute a range PromQL query against the cluster's Thanos Querier.\nReturns metric values over a time range with specified resolution.\nUse this for time-series data, trends, and historical analysis.\n\nSupports relative times:\n- 'now' for current time\n- '-10m', '-1h', '-1d' for relative past times\n\nExample: Get CPU usage over the last hour with 1-minute resolution.",
721-
"inputSchema": {
722-
"properties": {
723-
"context": {
724-
"description": "Optional parameter selecting which context to run the tool in. Defaults to fake-context if not set",
725-
"enum": [
726-
"extra-cluster",
727-
"fake-context"
728-
],
729-
"type": "string"
730-
},
731-
"end": {
732-
"description": "End time. Accepts RFC3339 timestamp, Unix timestamp, 'now', or relative time",
733-
"type": "string"
734-
},
735-
"query": {
736-
"description": "PromQL query string (e.g., 'rate(container_cpu_usage_seconds_total[5m])')",
737-
"type": "string"
738-
},
739-
"start": {
740-
"description": "Start time. Accepts RFC3339 timestamp (e.g., '2024-01-01T12:00:00Z'), Unix timestamp, or relative time (e.g., '-1h', '-30m', '-1d')",
741-
"type": "string"
742-
},
743-
"step": {
744-
"default": "1m",
745-
"description": "Query resolution step width (e.g., '15s', '1m', '5m'). Determines the granularity of returned data points. Default: '1m'",
746-
"type": "string"
747-
}
748-
},
749-
"required": [
750-
"query",
751-
"start",
752-
"end"
753-
],
754-
"type": "object"
755-
},
756-
"name": "prometheus_query_range",
757-
"title": "Prometheus: Range Query"
758-
},
759632
{
760633
"annotations": {
761634
"destructiveHint": true,

pkg/mcp/testdata/toolsets-full-tools-multicluster.json

Lines changed: 0 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,4 @@
11
[
2-
{
3-
"annotations": {
4-
"destructiveHint": false,
5-
"idempotentHint": true,
6-
"openWorldHint": true,
7-
"readOnlyHint": true,
8-
"title": "Alertmanager: Get Alerts"
9-
},
10-
"description": "Query active and pending alerts from the cluster's Alertmanager.\nUseful for monitoring cluster health, detecting issues, and incident response.\n\nReturns alerts with their labels, annotations, status, and timing information.\nCan filter by active/silenced/inhibited state.\n\nCommon use cases:\n- Check for critical alerts affecting the cluster\n- Monitor for specific alert types (e.g., high CPU, disk pressure)\n- Verify alert silences are working correctly",
11-
"inputSchema": {
12-
"properties": {
13-
"active": {
14-
"default": true,
15-
"description": "Filter for active (firing) alerts. Default: true",
16-
"type": "boolean"
17-
},
18-
"context": {
19-
"description": "Optional parameter selecting which context to run the tool in. Defaults to fake-context if not set",
20-
"type": "string"
21-
},
22-
"filter": {
23-
"description": "Optional filter using Alertmanager filter syntax. Examples: 'alertname=Watchdog', 'severity=critical', 'namespace=openshift-monitoring'",
24-
"type": "string"
25-
},
26-
"inhibited": {
27-
"default": false,
28-
"description": "Include inhibited alerts in the results. Default: false",
29-
"type": "boolean"
30-
},
31-
"silenced": {
32-
"default": false,
33-
"description": "Include silenced alerts in the results. Default: false",
34-
"type": "boolean"
35-
}
36-
},
37-
"type": "object"
38-
},
39-
"name": "alertmanager_alerts",
40-
"title": "Alertmanager: Get Alerts"
41-
},
422
{
433
"annotations": {
444
"destructiveHint": false,
@@ -605,81 +565,6 @@
605565
"name": "pods_top",
606566
"title": "Pods: Top"
607567
},
608-
{
609-
"annotations": {
610-
"destructiveHint": false,
611-
"idempotentHint": true,
612-
"openWorldHint": true,
613-
"readOnlyHint": true,
614-
"title": "Prometheus: Instant Query"
615-
},
616-
"description": "Execute an instant PromQL query against the cluster's Thanos Querier.\nReturns current metric values at the specified time (or current time if not specified).\nUse this for point-in-time metric values.\n\nCommon queries:\n- up{job=\"apiserver\"} - Check if API server is up\n- sum by(namespace) (container_memory_usage_bytes) - Memory usage by namespace\n- rate(container_cpu_usage_seconds_total[5m]) - CPU usage rate\n- kube_pod_status_phase{phase=\"Running\"} - Running pods count",
617-
"inputSchema": {
618-
"properties": {
619-
"context": {
620-
"description": "Optional parameter selecting which context to run the tool in. Defaults to fake-context if not set",
621-
"type": "string"
622-
},
623-
"query": {
624-
"description": "PromQL query string (e.g., 'up{job=\"apiserver\"}', 'sum by(namespace) (container_memory_usage_bytes)')",
625-
"type": "string"
626-
},
627-
"time": {
628-
"description": "Optional evaluation timestamp. Accepts RFC3339 format (e.g., '2024-01-01T12:00:00Z') or Unix timestamp. If not provided, uses current time.",
629-
"type": "string"
630-
}
631-
},
632-
"required": [
633-
"query"
634-
],
635-
"type": "object"
636-
},
637-
"name": "prometheus_query",
638-
"title": "Prometheus: Instant Query"
639-
},
640-
{
641-
"annotations": {
642-
"destructiveHint": false,
643-
"idempotentHint": true,
644-
"openWorldHint": true,
645-
"readOnlyHint": true,
646-
"title": "Prometheus: Range Query"
647-
},
648-
"description": "Execute a range PromQL query against the cluster's Thanos Querier.\nReturns metric values over a time range with specified resolution.\nUse this for time-series data, trends, and historical analysis.\n\nSupports relative times:\n- 'now' for current time\n- '-10m', '-1h', '-1d' for relative past times\n\nExample: Get CPU usage over the last hour with 1-minute resolution.",
649-
"inputSchema": {
650-
"properties": {
651-
"context": {
652-
"description": "Optional parameter selecting which context to run the tool in. Defaults to fake-context if not set",
653-
"type": "string"
654-
},
655-
"end": {
656-
"description": "End time. Accepts RFC3339 timestamp, Unix timestamp, 'now', or relative time",
657-
"type": "string"
658-
},
659-
"query": {
660-
"description": "PromQL query string (e.g., 'rate(container_cpu_usage_seconds_total[5m])')",
661-
"type": "string"
662-
},
663-
"start": {
664-
"description": "Start time. Accepts RFC3339 timestamp (e.g., '2024-01-01T12:00:00Z'), Unix timestamp, or relative time (e.g., '-1h', '-30m', '-1d')",
665-
"type": "string"
666-
},
667-
"step": {
668-
"default": "1m",
669-
"description": "Query resolution step width (e.g., '15s', '1m', '5m'). Determines the granularity of returned data points. Default: '1m'",
670-
"type": "string"
671-
}
672-
},
673-
"required": [
674-
"query",
675-
"start",
676-
"end"
677-
],
678-
"type": "object"
679-
},
680-
"name": "prometheus_query_range",
681-
"title": "Prometheus: Range Query"
682-
},
683568
{
684569
"annotations": {
685570
"destructiveHint": true,

0 commit comments

Comments
 (0)