-
Notifications
You must be signed in to change notification settings - Fork 436
Expand file tree
/
Copy pathAksSetup.cs
More file actions
43 lines (34 loc) · 2 KB
/
AksSetup.cs
File metadata and controls
43 lines (34 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Azure.Mcp.Tools.Aks.Commands.Cluster;
using Azure.Mcp.Tools.Aks.Commands.Nodepool;
using Azure.Mcp.Tools.Aks.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Mcp.Core.Areas;
using Microsoft.Mcp.Core.Commands;
namespace Azure.Mcp.Tools.Aks;
public class AksSetup : IAreaSetup
{
public string Name => "aks";
public string Title => "Manage Azure Kubernetes Service";
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IAksService, AksService>();
services.AddSingleton<ClusterGetCommand>();
services.AddSingleton<NodepoolGetCommand>();
}
public CommandGroup RegisterCommands(IServiceProvider serviceProvider)
{
// Create AKS command group
var aks = new CommandGroup(Name, "Azure Kubernetes Service operations - Manage and query Azure Kubernetes Service (AKS) resources across subscriptions. Use when you need subscription-scoped visibility into AKS cluster and node pool metadata—including Azure resource IDs, networking endpoints, identity configuration, and provisioning state—for governance or automation. Requires Azure subscription context. Not for kubectl execution, pod lifecycle changes, or in-cluster application deployments—use Kubernetes-native tooling for those tasks.", Title);
// Create AKS subgroups
var cluster = new CommandGroup("cluster", "AKS cluster operations - Commands for listing and managing AKS clusters in your Azure subscription.");
aks.AddSubGroup(cluster);
var nodepool = new CommandGroup("nodepool", "AKS node pool operations - Commands for listing and managing AKS node pools for an AKS cluster.");
aks.AddSubGroup(nodepool);
// Register AKS commands
cluster.AddCommand(serviceProvider.GetRequiredService<ClusterGetCommand>());
nodepool.AddCommand(serviceProvider.GetRequiredService<NodepoolGetCommand>());
return aks;
}
}