resource

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterResourceTools

func RegisterResourceTools(s *mcpserver.MCPServer, sc *server.ServerContext) error

RegisterResourceTools registers all resource management tools with the MCP server

Types

type ApplyResourceArgs

type ApplyResourceArgs struct {
	KubeContext string      `json:"kubeContext,omitempty"`
	Namespace   string      `json:"namespace"`
	Manifest    interface{} `json:"manifest"`
}

ApplyResourceArgs defines the arguments for kubectl apply operations

type CreateResourceArgs

type CreateResourceArgs struct {
	KubeContext string      `json:"kubeContext,omitempty"`
	Namespace   string      `json:"namespace"`
	Manifest    interface{} `json:"manifest"`
}

CreateResourceArgs defines the arguments for kubectl create operations

type DeleteResourceArgs

type DeleteResourceArgs struct {
	KubeContext  string `json:"kubeContext,omitempty"`
	Namespace    string `json:"namespace"`
	ResourceType string `json:"resourceType"`
	Name         string `json:"name"`
}

DeleteResourceArgs defines the arguments for kubectl delete operations

type DescribeResourceArgs

type DescribeResourceArgs struct {
	KubeContext  string `json:"kubeContext,omitempty"`
	Namespace    string `json:"namespace"`
	ResourceType string `json:"resourceType"`
	Name         string `json:"name"`
}

DescribeResourceArgs defines the arguments for kubectl describe operations

type GetResourceArgs

type GetResourceArgs struct {
	KubeContext  string `json:"kubeContext,omitempty"`
	Namespace    string `json:"namespace"`
	ResourceType string `json:"resourceType"`
	Name         string `json:"name"`
}

GetResourceArgs defines the arguments for kubectl get operations

type ListResourceArgs

type ListResourceArgs struct {
	KubeContext        string `json:"kubeContext,omitempty"`
	Namespace          string `json:"namespace"`
	ResourceType       string `json:"resourceType"`
	LabelSelector      string `json:"labelSelector,omitempty"`
	FieldSelector      string `json:"fieldSelector,omitempty"`
	AllNamespaces      bool   `json:"allNamespaces,omitempty"`
	FullOutput         bool   `json:"fullOutput,omitempty"`
	IncludeLabels      bool   `json:"includeLabels,omitempty"`
	IncludeAnnotations bool   `json:"includeAnnotations,omitempty"`
}

ListResourceArgs defines the arguments for kubectl list operations

type ListSummaryResponse added in v0.0.11

type ListSummaryResponse struct {
	Kind     string            `json:"kind"`
	Items    []ResourceSummary `json:"items"`
	Total    int               `json:"total"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

ListSummaryResponse contains the summarized list of resources

func SummarizeResources added in v0.0.11

func SummarizeResources(objects []runtime.Object, includeLabels, includeAnnotations bool) *ListSummaryResponse

SummarizeResources converts a list of runtime.Objects to compact ResourceSummary objects

type PatchResourceArgs

type PatchResourceArgs struct {
	KubeContext  string      `json:"kubeContext,omitempty"`
	Namespace    string      `json:"namespace"`
	ResourceType string      `json:"resourceType"`
	Name         string      `json:"name"`
	PatchType    string      `json:"patchType"`
	Patch        interface{} `json:"patch"`
}

PatchResourceArgs defines the arguments for kubectl patch operations

type ResourceSummary added in v0.0.11

type ResourceSummary struct {
	Name              string            `json:"name"`
	Namespace         string            `json:"namespace,omitempty"`
	Kind              string            `json:"kind"`
	APIVersion        string            `json:"apiVersion"`
	CreationTimestamp string            `json:"creationTimestamp"`
	Age               string            `json:"age"`
	Status            string            `json:"status,omitempty"`
	Ready             string            `json:"ready,omitempty"`
	Labels            map[string]string `json:"labels,omitempty"`
	Annotations       map[string]string `json:"annotations,omitempty"`
	// Additional fields specific to resource types
	Extra map[string]interface{} `json:"extra,omitempty"`
}

ResourceSummary represents a compact view of a Kubernetes resource

type ScaleResourceArgs

type ScaleResourceArgs struct {
	KubeContext  string `json:"kubeContext,omitempty"`
	Namespace    string `json:"namespace"`
	ResourceType string `json:"resourceType"`
	Name         string `json:"name"`
	Replicas     int32  `json:"replicas"`
}

ScaleResourceArgs defines the arguments for kubectl scale operations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL