Commit aaea8d1
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: #23721 parent 332abe0 commit aaea8d1
2 files changed
Lines changed: 18 additions & 2 deletions
File tree
- plugin/skills/azure-kubernetes
- tests/azure-kubernetes/__snapshots__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
| |||
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
| |||
67 | 75 | | |
68 | 76 | | |
69 | 77 | | |
| 78 | + | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| |||
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| 104 | + | |
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
| |||
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
| 113 | + | |
103 | 114 | | |
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
108 | 122 | | |
| 123 | + | |
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
| |||
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| 133 | + | |
118 | 134 | | |
119 | 135 | | |
120 | 136 | | |
| |||
0 commit comments