Skip to content

Commit aaea8d1

Browse files
authored
azure-kubernetes: add VPA and pod rightsizing routing triggers (#2391)
* azure-kubernetes: add VPA and pod rightsizing routing triggers The integration test 'invokes azure-kubernetes skill for pod rightsizing prompt' has been flaky (0.2 invocation rate vs 0.8 threshold). The prompt 'Rightsize AKS pod resource requests/limits using VPA recommendations' was routing to azure-compute or azure-documentation in 4 of 5 runs because the azure-kubernetes WHEN clause did not list the specific VPA and pod-resource vocabulary that the prompt uses. Add explicit triggers so routing is deterministic: - rightsize AKS pods (plural) - pod rightsizing - over-provisioned pods - pod resource requests and limits - container CPU and memory requests - Vertical Pod Autoscaler, VPA, VPA recommendations - kubectl top pods No terms are removed; azure-compute already does not mention AKS, pods, or rightsizing, so there is no collision to clear on that side. The change only sharpens azure-kubernetes' WHEN clause. Refs: #2372 * Trim AKS triggers to fit char budget; update snapshot The previous revision pushed the formatted skill description total over the 20000-char Copilot CLI budget by 54 chars and stale-dated the triggers snapshot. This change: - Drops the lower-value duplicate phrasing (the singular form 'rightsize AKS pod' is already covered by the plural; 'container CPU and memory requests' is covered by 'pod resource requests and limits'; 'VPA' and 'kubectl top pods' are redundant with 'Vertical Pod Autoscaler' and 'over-provisioned pods'). - Refreshes tests/azure-kubernetes/__snapshots__/triggers.test.ts.snap for the new description text and the new extracted keywords (autoscaler, limits, over-provisioned, pods, recommendations, requests, resource, rightsizing, vertical). Refs: #2372 * Drop plural 'pods' keyword to preserve anti-trigger test The previous push added 'pods' (plural) to azure-kubernetes' WHEN clause. The triggers test extracts every word > 3 chars from the description as a keyword, so 'pods' became a routable token. That broke the anti-trigger assertion for the prompt 'Troubleshoot why pods in my AKS cluster are crashlooping', which is meant to route to azure-diagnostics — with both 'aks' and 'pods' matching, the two-keyword threshold tripped. Use the singular 'pod' everywhere in the description. The keyword extractor filters words of length <= 3 (apart from a hardcoded 'ai' exception), so 'pod' contributes no new routing token, while the human-readable triggers still cover the VPA / rightsizing prompts the integration tests exercise. Replace 'over-provisioned pods' with 'over-provisioned AKS pod' so the phrase still reads naturally without the plural. Snapshot updated to match (description text refreshed, 'pods' removed from both keyword arrays). Refs: #2372
1 parent 332abe0 commit aaea8d1

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

plugin/skills/azure-kubernetes/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ license: MIT
44
metadata:
55
author: Microsoft
66
version: "0.0.0-placeholder"
7-
description: "Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters. Covers Day-0 checklist, SKU selection (Automatic vs Standard), networking options (private API server, Azure CNI Overlay, egress configuration), security, and operations (autoscaling, upgrade strategy, cost analysis). WHEN: create AKS environment, provision AKS environment, enable AKS observability, design AKS networking, choose AKS SKU, secure AKS, optimize AKS, rightsize AKS pod, AKS spot nodes, AKS cluster-autoscaler."
7+
description: "Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters. Covers Day-0 checklist, SKU selection (Automatic vs Standard), networking options (private API server, Azure CNI Overlay, egress configuration), security, and operations (autoscaling, upgrade strategy, cost analysis). WHEN: create AKS environment, provision AKS, enable AKS observability, design AKS networking, choose AKS SKU, secure AKS, optimize AKS, AKS spot nodes, AKS cluster-autoscaler, rightsize AKS pod, pod rightsizing, over-provisioned AKS pod, pod resource requests and limits, Vertical Pod Autoscaler, VPA recommendations."
88
---
99

1010
# Azure Kubernetes Service

tests/azure-kubernetes/__snapshots__/triggers.test.ts.snap

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill description triggers match snapshot 1`] = `
44
{
5-
"description": "Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters. Covers Day-0 checklist, SKU selection (Automatic vs Standard), networking options (private API server, Azure CNI Overlay, egress configuration), security, and operations (autoscaling, upgrade strategy, cost analysis). WHEN: create AKS environment, provision AKS environment, enable AKS observability, design AKS networking, choose AKS SKU, secure AKS, optimize AKS, rightsize AKS pod, AKS spot nodes, AKS cluster-autoscaler.",
5+
"description": "Plan, create, and configure production-ready Azure Kubernetes Service (AKS) clusters. Covers Day-0 checklist, SKU selection (Automatic vs Standard), networking options (private API server, Azure CNI Overlay, egress configuration), security, and operations (autoscaling, upgrade strategy, cost analysis). WHEN: create AKS environment, provision AKS, enable AKS observability, design AKS networking, choose AKS SKU, secure AKS, optimize AKS, AKS spot nodes, AKS cluster-autoscaler, rightsize AKS pod, pod rightsizing, over-provisioned AKS pod, pod resource requests and limits, Vertical Pod Autoscaler, VPA recommendations.",
66
"extractedKeywords": [
77
"aks",
88
"analysis",
99
"automatic",
10+
"autoscaler",
1011
"autoscaling",
1112
"azure",
1213
"checklist",
@@ -32,6 +33,7 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill descri
3233
"identity",
3334
"key vault",
3435
"kubernetes",
36+
"limits",
3537
"mcp",
3638
"monitor",
3739
"networking",
@@ -40,12 +42,17 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill descri
4042
"operations",
4143
"optimize",
4244
"options",
45+
"over-provisioned",
4346
"overlay",
4447
"plan",
4548
"private",
4649
"production-ready",
4750
"provision",
51+
"recommendations",
52+
"requests",
53+
"resource",
4854
"rightsize",
55+
"rightsizing",
4956
"secure",
5057
"security",
5158
"selection",
@@ -55,6 +62,7 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill descri
5562
"standard",
5663
"strategy",
5764
"upgrade",
65+
"vertical",
5866
"vnet",
5967
"when",
6068
],
@@ -67,6 +75,7 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill keywor
6775
"aks",
6876
"analysis",
6977
"automatic",
78+
"autoscaler",
7079
"autoscaling",
7180
"azure",
7281
"checklist",
@@ -92,6 +101,7 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill keywor
92101
"identity",
93102
"key vault",
94103
"kubernetes",
104+
"limits",
95105
"mcp",
96106
"monitor",
97107
"networking",
@@ -100,12 +110,17 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill keywor
100110
"operations",
101111
"optimize",
102112
"options",
113+
"over-provisioned",
103114
"overlay",
104115
"plan",
105116
"private",
106117
"production-ready",
107118
"provision",
119+
"recommendations",
120+
"requests",
121+
"resource",
108122
"rightsize",
123+
"rightsizing",
109124
"secure",
110125
"security",
111126
"selection",
@@ -115,6 +130,7 @@ exports[`azure-kubernetes - Trigger Tests Trigger Keywords Snapshot skill keywor
115130
"standard",
116131
"strategy",
117132
"upgrade",
133+
"vertical",
118134
"vnet",
119135
"when",
120136
]

0 commit comments

Comments
 (0)