k8s

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package k8s provides adapters that let aks-mcp interoperate with the mcp-kubernetes libraries. It maps aks-mcp configuration and executors to the types expected by mcp-kubernetes without altering behavior.

Index

Constants

View Source
const (
	AccessLevelReadOnly  = "readonly"
	AccessLevelReadWrite = "readwrite"
)

Variables

This section is empty.

Functions

func ConvertConfig

func ConvertConfig(cfg *config.ConfigData) *k8sconfig.ConfigData

ConvertConfig maps an aks-mcp ConfigData into the equivalent mcp-kubernetes ConfigData without mutating the input.

func RegisterKubectlTools added in v0.0.14

func RegisterKubectlTools(accessLevel string, useUnifiedTool bool, tokenAuthOnly bool) []mcp.Tool

func WrapK8sExecutor

func WrapK8sExecutor(k8sExecutor k8stools.CommandExecutor, tokenAuthOnly bool) tools.CommandExecutor

WrapK8sExecutor makes an mcp-kubernetes CommandExecutor compatible with the aks-mcp tools.CommandExecutor interface.

Types

type RequestContext added in v0.0.14

type RequestContext struct {
	AzureToken     string `json:"azure_token"`
	SubscriptionID string `json:"subscription_id"`
	ResourceGroup  string `json:"resource_group"`
	ClusterName    string `json:"cluster_name"`
}

type RunCommandExecutor added in v0.0.14

type RunCommandExecutor struct{}

func NewRunCommandExecutor added in v0.0.14

func NewRunCommandExecutor() *RunCommandExecutor

func (*RunCommandExecutor) Execute added in v0.0.14

func (e *RunCommandExecutor) Execute(ctx context.Context, params map[string]interface{}, cfg *k8sconfig.ConfigData) (string, error)

Jump to

Keyboard shortcuts

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