diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go index b12f326..1e70fd6 100644 --- a/pkg/helm/helm.go +++ b/pkg/helm/helm.go @@ -26,8 +26,8 @@ func NewHelm(kubernetes Kubernetes, namespace string) *Helm { return &Helm{kubernetes: kubernetes} } -// ReleasesList lists all the releases for the specified namespace (or current namespace if). Or allNamespaces is true, it lists all releases across all namespaces. -func (h *Helm) ReleasesList(namespace string, allNamespaces bool) (string, error) { +// List lists all the releases for the specified namespace (or current namespace if). Or allNamespaces is true, it lists all releases across all namespaces. +func (h *Helm) List(namespace string, allNamespaces bool) (string, error) { cfg := new(action.Configuration) applicableNamespace := "" if !allNamespaces { diff --git a/pkg/mcp/helm.go b/pkg/mcp/helm.go index 38c0dcb..11b2eb1 100644 --- a/pkg/mcp/helm.go +++ b/pkg/mcp/helm.go @@ -29,7 +29,7 @@ func (s *Server) helmList(_ context.Context, ctr mcp.CallToolRequest) (*mcp.Call if v, ok := ctr.Params.Arguments["namespace"].(string); ok { namespace = v } - ret, err := s.k.Helm.ReleasesList(namespace, allNamespaces) + ret, err := s.k.Helm.List(namespace, allNamespaces) if err != nil { return NewTextResult("", fmt.Errorf("failed to list helm releases in namespace '%s': %w", namespace, err)), nil } diff --git a/pkg/mcp/helm_test.go b/pkg/mcp/helm_test.go index 340c0b9..21d47a7 100644 --- a/pkg/mcp/helm_test.go +++ b/pkg/mcp/helm_test.go @@ -26,7 +26,7 @@ func TestHelmList(t *testing.T) { t.Fatalf("unexpected result %v", toolResult.Content[0].(mcp.TextContent).Text) } }) - _, err = kc.CoreV1().Secrets("default").Create(c.ctx, &corev1.Secret{ + _, _ = kc.CoreV1().Secrets("default").Create(c.ctx, &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: "release-to-list", Labels: map[string]string{"owner": "helm"},