Azure / vscode-aks-tools

Visual Studio Code extension for Azure Kubernetes Service
MIT License
41 stars 50 forks source link

Feature enable KAITO Install and Workspace YAML generation. #899

Closed Tatsinnit closed 1 week ago

Tatsinnit commented 1 week ago

This PR enables and implements KAITO one-click install against AKS cluster and further also helps in generating workspace yaml scaffolding.

A detail discussion for implementation reside here: https://github.com/Azure/vscode-aks-tools/discussions/875

The U/X is handled by crisp work by @hsubramanianaks and further test by @tejhan .

Idea is very well explained in the discussion link above but to re-iterate quickly, here this might help.

U/X from working version:

Testing VSIX vscode-aks-tools-1.4.9-kaito-test1.vsix.zip

Screenshot 2024-09-06 at 9 10 58 PM

Development Idea AKS SDK Usage

1: SDK Ways to approach and less to get lost in dense doc mentioned above.

Page1

Sample code

https://learn.microsoft.com/en-us/rest/api/resources/features/register?view=rest-resources-2021-07-01&tabs=JavaScript

        const { FeatureClient } = require("@azure/arm-features");
        const { DefaultAzureCredential } = require("@azure/identity");

        async function registerFeature() {
          const resourceProviderNamespace = "Resource Provider Namespace"; // <-- --namespace "Microsoft.ContainerService" 
          const featureName = "feature"; // <--  --name "AIToolchainOperatorPreview"
          const credential = new DefaultAzureCredential(); 
          const client = new FeatureClient(credential, subscriptionId);
          const result = await client.features.register(resourceProviderNamespace, featureName);
          console.log(result);
        }

        registerFeature().catch(console.error);

2: Observation Part

Page2

3: CRD Generation

Page3