AKS 部署上下文解析
skill-deployment-context
[技能] deployment context、aks、azure、koji —— 解析 Koji AKS 部署上下文,包括资源组、集群名称、订阅、Log Analytics 工作区及监控资源名称:优先从 deployment_summary.yaml 获取(若可用),否则从 Azure 动态发现。
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 5.4k
- Forks
- 714
01 前言 Front Matter
- name
- skill-deployment-context
- description
- [Skill] deployment context, aks, azure, koji - Resolve Koji AKS deployment context -- resource group, cluster name, subscription, Log Analytics workspace, and monitoring resource names from deployment_summary.yaml when available, or discover them dynamically from Azure.
- user-invocable
- false
- disable-model-invocation
- false
02 资源文件 4
- 脚本scripts/localization_checks.ps159.2 KB
- 脚本tests/LocalizationChecks.Tests.ps136.6 KB
- 脚本tests/LocalizationSummary.Tests.ps15.8 KB
- 脚本tests/LocalizationWorkflow.Tests.ps15.5 KB
03 SKILL.md 正文
Koji Deployment Context Discovery
Always resolve context before running queries. Never assume resource names.
Step 1: Locate deployment_summary.yaml (if available)
This file is typically generated by the Koji deployment pipeline (e.g., as an Azure DevOps pipeline artifact) and stored at the repository root as ./deployment_summary.yaml. It should contain resource_group, aks_cluster_name, subscription_id, and monitoring resource names/IDs.
- If the file exists, open it and use its values as the source of truth for the deployment context.
- If the file does not exist (e.g., in a new or manually provisioned environment), skip to Steps 2–4 and resolve the deployment context directly from Azure.
- If the user needs help obtaining this file, offer to run
azcommands to discover the values and generate it for them.
Step 2: If subscription is missing
Run: az account show --query id -o tsv
Step 3: If deployment does not match the summary
Ask the user for the resource group or AKS cluster name.
Step 4: Discover monitoring resources dynamically
az monitor log-analytics workspace list --resource-group <RG> -o table
az resource list --resource-group <RG> --resource-type Microsoft.Monitor/accounts -o table
az resource list --resource-group <RG> --resource-type Microsoft.Dashboard/grafana -o table
Naming convention
Resources follow <prefix>-koji-*:
- Resource group:
<prefix>-koji-rg-<suffix> - AKS cluster:
<prefix>-koji-aks - Log Analytics:
<prefix>-koji-logs - Azure Monitor:
<prefix>-koji-monitor - Grafana:
<prefix>-koji-grafana
MCP tools for context discovery
| Tool | Purpose |
|---|---|
aks_cluster_get |
List/get AKS cluster details |
aks_nodepool_get |
List/get node pool details |
monitor_table_list |
List tables in a Log Analytics workspace |
Prerequisites: Node.js (npx) and an active az login session.
04 同仓库更多 Skills
AKS 节点指标查询
skill-metrics
[技能] metrics、azure-monitor、aks——查询 Azure Monitor 指标,包括 Koji AKS 节点的 CPU、内存、磁盘使用率以及 Pod 就绪状态。
构建失败批量分诊
skill-mass-triage
[技能] 从 JSON 结果文件中批量分诊构建失败——使用并行子代理进行诊断,按根因分类归纳,并生成汇总报告。当被要求对 Koji 结果文件进行分诊时使用。触发词:批量分诊、大规模分诊、分诊结果文件、按类别归纳失败。
KQL 日志查询模板
skill-kql-queries
[技能] kql、queries、log analytics、container logs —— 通过 Log Analytics 提供 KQL 查询模板,用于查询 Koji 容器日志、pod 错误、重启、Kubernetes 事件、构建作业活动及节点资源使用情况。
Koji 构建故障分诊
skill-koji-triage
[技能] 检查 Koji 构建,从 Koji Web UI 获取任务信息与日志,识别失败并提供根因分析。在分诊 Koji 构建失败、调查失败任务、下载构建日志或搜索损坏软件包时使用。触发词:koji failure、koji build failed、koji task、koji log、koji triage、build failure analysis。
Fedora 镜像依赖注入修复
skill-fedora-mirror-injections
[技能] 诊断 Azure Linux Stage 1(bootstrap-mirror)的 BuildRequires 解析失败,并通过 azl-infra 注入文件将缺失的 RPM 回填到生产 Fedora 更新镜像。在分诊 stage-1 / azl4-bootstrap-mirror 构建失败、排查 Fedora 镜像中的依赖缺口、判断失败究竟是真正的镜像缺口还是瞬时超时或 spec 缺陷、向 azl4-stage1-injections.yaml 添加条目,或提交带镜像注入的 PR 时使用。触发词:bootstrap-mirror、stage 1 build failure、fedora mirror gap、missing BuildRequires、nothing provides crate、no match for argument、injections file、azl4-stage1-injections、mirror injection。
AKS 集群健康巡检
skill-aks-health
[技能] aks、aks health、cluster health、node pool、activity logs —— 检查 Koji AKS 集群健康状况、节点池状态、自动扩缩容、活动日志、部署失败情况以及 Azure 控制平面操作。