Huawei Cloud Cce Change Impact Analyzer
/install huawei-cloud-cce-change-impact-analyzer
\r \r
CCE Change Impact Analyzer\r
\r
⚠️ Execution Method (Must Read): This skill executes diagnosis via local Python scripts using the
scripts/huawei-cloud.pydispatcher. Using hcloud, kubectl, or other CLI tools or direct API calls is prohibited.\r \r
- All actions are dispatched through
scripts/huawei-cloud.pywith--action \x3Caction_name>and--params \x3Cjson_params>\r- All scripts and environment check scripts are inside the skill package. You must use
skill action=execto execute them; do not run them directly in a shell\r- For action names and parameters, see the Core Tools section below\r
- Do not attempt hcloud, kubectl, curl IAM, or other CLI/API methods. This skill does not depend on these tools\r
- All paths are relative to the skill directory, which is the directory where this SKILL.md resides\r \r
Overview\r
\r This skill turns "what changed before the incident" into provable causal attribution. It ingests audit logs, K8s historical events, AOM active+history alarms, and current resource topology snapshots; filters noise; maps core changes to blast radius; scores risk by sensitivity, topology scope, security boundary span, temporal proximity to fault, and event/alarm correlation; then outputs a complete Markdown report with investigation steps, core change timeline, evidence matrix, blast radius, Top N risk alerts, conclusion, and data gaps.\r \r This skill is applicable to the following scenarios:\r \r
- Incidents where recent workload releases, config updates, or network/security policy changes may be the cause\r
- CoreDNS, kube-proxy, or cluster plugin configuration changes causing business-wide failures\r
- Node taint, cordon/drain, node pool resize, or cluster upgrade triggering Pod Pending, Evicted, or NotReady\r
- NetworkPolicy/RBAC changes causing connection timeouts, 403 errors, DNS anomalies, or cross-namespace access failures\r
- Service/Ingress/Gateway route changes causing traffic routing failures\r
- Correlating audit trail changes with observed failures and alarm timelines\r \r This skill does NOT handle the following:\r \r
- Executing any remediation actions (rollback, scale, delete, drain, reboot, modify NetworkPolicy/RBAC/Security Group/VPC ACL)\r
- Making causal conclusions from object updates alone without temporal or response-signal correlation\r
- Creating, modifying, or deleting CCE resources\r
- Guessing or fabricating diagnosis results without evidence\r \r ---\r \r
Prerequisites\r
\r Before using, you must run the environment check script to complete environment validation and dependency installation in one step:\r \r
- Linux / macOS:
skill action=exec: bash skill://scripts/check_env.sh\r - Windows:
skill action=exec: powershell -ExecutionPolicy Bypass -File skill://scripts/check_env.ps1\r \r
Windows Note: Do not use
&&to chain commands (PowerShell 5.x does not support it). Use semicolons if you need to change directories first.\r \r The script will check in sequence: Python >= 3.6 → install dependencies → validate SDK → validate credentials → validate service availability.\r If the environment check fails, fix the issues before continuing with other actions.\r \r Environment Variables:\r \r | Variable | Required | Description |\r |----------|----------|-------------|\r | HW_ACCESS_KEY | Yes | Huawei Cloud AK |\r | HW_SECRET_KEY | Yes | Huawei Cloud SK |\r | HW_REGION_NAME | No | Default cn-north-4 |\r | HW_PROJECT_ID | No | Project ID (automatically obtained via IAM API when not set) |\r | HW_SECURITY_TOKEN | No | Required when using temporary AK/SK |\r | HW_CLUSTER_ID | No | Default CCE cluster ID (can also be passed per action) |\r \r Security Constraints:\r \r
- Never persist credentials (AK/SK/Token/Certificate) to the filesystem\r
- AK/SK exist only within the current request call stack; released after use\r
- Only non-sensitive project IDs are cached in process memory (never written to disk)\r
- All temporary certificate files must be deleted immediately after use\r
- Never expose AK/SK in logs, responses, or error messages\r \r Do not output the values of the above environment variables.\r \r ---\r \r
IAM Permission Requirements\r
\r | API Action | Permission | Purpose |\r |-----------|------------|---------|\r | cce:cluster:get | Get cluster | View cluster details |\r | cce:cluster:list | List clusters | List CCE clusters |\r | cce:node:list | List nodes | List cluster nodes |\r | cce:nodepool:list | List node pools | List node pools |\r | aom:*:get | Read AOM | Query AOM metrics and alarms |\r | aom:alarmRule:list | List alarm rules | Query alarm rules |\r | aom:event:list | List events | Query AOM alarm events |\r \r Permission Failure Handling:\r
- When any command fails due to permission errors, display required permission list\r
- Guide the user to create a custom policy in the IAM console\r
- Pause execution and wait for user confirmation\r \r ---\r \r
Core Tools\r
\r
All actions are dispatched through scripts/huawei-cloud.py using skill action=exec.\r
\r
Primary Change Impact Analysis\r
\r
| Action | Required Parameters | Description |\r
|--------|---------------------|-------------|\r
| huawei_change_impact_analyze | region, cluster_id | Primary comprehensive action: orchestrates audit log ingestion, K8s event correlation, AOM alarm correlation, resource snapshot collection, noise filtering, blast radius modeling, and risk scoring into a unified change impact report with Top N risk alerts |\r
\r
Audit and Event Collection\r
\r
| Action | Required Parameters | Description |\r
|--------|---------------------|-------------|\r
| huawei_query_cce_audit_logs | region, cluster_id | Query CCE Kubernetes audit logs for create/update/patch/delete operations with actor, verb, resource, namespace, name, requestURI, statusCode |\r
| huawei_query_k8s_events_from_lts | region, cluster_id | Query historical K8s Events from LTS (overcomes the K8s API short event window) |\r
| huawei_get_cce_events | region, cluster_id | List current Kubernetes Events when LTS is unavailable |\r
\r
Alarm Correlation\r
\r
| Action | Required Parameters | Description |\r
|--------|---------------------|-------------|\r
| huawei_analyze_aom_alarms | region, cluster_id | Analyze AOM active + history alarm patterns and correlation across resources |\r
\r
Domain Drill-Down (Read-Only)\r
\r
| Action | Required Parameters | Description |\r
|--------|---------------------|-------------|\r
| huawei_workload_rollout_diagnose | region, cluster_id, namespace, kind, name | Drill down when changes point to Deployment/StatefulSet/DaemonSet rollout failures (cross-skill: huawei-cloud-cce-workload-failure-diagnoser) |\r
| huawei_network_failure_diagnose | region, cluster_id | Drill down when changes point to Service/Ingress/NetworkPolicy/ELB connectivity failures (cross-skill: huawei-cloud-cce-network-failure-diagnoser) |\r
| huawei_node_failure_diagnose | region, cluster_id | Drill down when changes point to Node taint, NotReady, scheduling, or resource pressure (cross-skill: huawei-cloud-cce-node-failure-diagnoser) |\r
\r
Current Topology Snapshots\r
\r
| Action | Required Parameters | Description |\r
|--------|---------------------|-------------|\r
| huawei_get_cce_pods | region, cluster_id | List current Pod status for blast radius modeling |\r
| huawei_get_cce_deployments | region, cluster_id | List current Deployment status |\r
| huawei_get_cce_services | region, cluster_id | List current Service selector/ports for impact mapping |\r
| huawei_get_cce_ingresses | region, cluster_id | List current Ingress rules/backends for impact mapping |\r
| huawei_get_kubernetes_nodes | region, cluster_id | List current Node status for taint/impact mapping |\r
| huawei_list_cce_configmaps | region, cluster_id | List current ConfigMap objects (identify CoreDNS, kube-proxy, business configs) |\r
| huawei_list_cce_secrets | region, cluster_id | List current Secret objects |\r
| huawei_list_cce_nodepools | region, cluster_id | List current NodePool status for infrastructure change context |\r
\r
Cloud Network Snapshots\r
\r
| Action | Required Parameters | Description |\r
|--------|---------------------|-------------|\r
| huawei_list_security_groups | region | List current Security Group rules for cloud network context |\r
| huawei_list_vpc_acls | region | List current VPC ACL rules for cloud network context |\r
\r
---\r
\r
Parameter Reference\r
\r
Common Parameters:\r
\r
| Parameter | Required | Description |\r
|-----------|----------|-------------|\r
| region | Yes | Huawei Cloud region, e.g., cn-north-4 |\r
| cluster_id | Yes | CCE cluster ID |\r
\r
Optional Parameters (passed via --params JSON):\r
\r
| Parameter | Description |\r
|-----------|-------------|\r
| hours | Analysis window in hours (default 1) |\r
| start_time | Analysis window start (YYYY-MM-DD HH:MM:SS), alternative to hours |\r
| end_time | Analysis window end (YYYY-MM-DD HH:MM:SS), alternative to hours |\r
| namespace | Narrow scope to a namespace, but do not exclude kube-system/CoreDNS global changes |\r
| target_name | Target object name for scope narrowing |\r
| workload_name | Workload name for scope narrowing |\r
| app_name | Application name for scope narrowing |\r
| fault_time | Incident time point for temporal proximity scoring |\r
| incident_time | Alternative to fault_time |\r
| log_group_id | Audit log group ID (manual fallback when auto-discovery fails) |\r
| log_stream_id | Audit log stream ID (manual fallback when auto-discovery fails) |\r
| include_audit | Enable/disable audit log collection (default true) |\r
| include_k8s_events | Enable/disable K8s event collection (default true) |\r
| include_aom | Enable/disable AOM alarm collection (default true) |\r
| include_snapshots | Enable/disable resource snapshot collection (default true) |\r
| top_n | Number of top risk alerts in report (default 3) |\r
| output_file | Path to write the Markdown report file |\r
| ak | Override AK (uses HW_ACCESS_KEY by default) |\r
| sk | Override SK (uses HW_SECRET_KEY by default) |\r
| project_id | Override project ID (auto-obtained via IAM when not set) |\r
\r
---\r
\r
Output Format\r
\r
Primary: huawei_change_impact_analyze\r
\r
Returns structured JSON with embedded report_markdown. See references/output-schema.md for full schema.\r
\r
{\r
"success": true,\r
"analysis_trace_id": "CIA-yyyymmddHHMMSS-xxxxxxxx",\r
"analysis_window": {\r
"start_time": "YYYY-MM-DD HH:MM:SS",\r
"end_time": "YYYY-MM-DD HH:MM:SS",\r
"hours": 1\r
},\r
"scope": {\r
"region": "cn-north-4",\r
"cluster_id": "cluster-id",\r
"namespace": "optional",\r
"target_name": "optional"\r
},\r
"summary": {\r
"core_change_count": 3,\r
"top_risk_count": 3,\r
"data_sources": {\r
"CCE Audit Logs": "success",\r
"K8s Historical Events": "success",\r
"AOM Alarms": "success",\r
"Current Resource Snapshots": "success"\r
}\r
},\r
"top_changes": [\r
{\r
"time": "YYYY-MM-DD HH:MM:SS",\r
"verb": "patch",\r
"resource": "configmaps",\r
"namespace": "kube-system",\r
"name": "coredns",\r
"object_key": "kube-system/coredns",\r
"category": "global_config_change",\r
"title": "Cluster core configuration change",\r
"actor": "user or serviceAccount",\r
"semantic_fields": ["data", "Corefile"],\r
"blast_radius": "cluster-wide",\r
"impacted_entities": {\r
"pods": [],\r
"services": ["kube-system/kube-dns"],\r
"ingresses": [],\r
"nodes": ["node-a"]\r
},\r
"risk_score": 96,\r
"risk_level": "Critical",\r
"confidence": "high",\r
"risk_reasons": [],\r
"evidence": []\r
}\r
],\r
"changes": [],\r
"report_markdown": "# CCE Change Impact Analysis Report\
...",\r
"report_file": "/optional/path/report.md",\r
"capture_metadata": {}\r
}\r
```\r
\r
---\r
\r
## Verification\r
\r
1. Run the environment check script to confirm dependencies and credentials are available\r
2. Use `huawei_change_impact_analyze` on a known stable cluster to verify it returns `success: true` with zero or low-confidence core changes\r
3. Use `huawei_change_impact_analyze` on a cluster with known recent changes to verify Top N risk alerts are accurately identified\r
4. Verify that noise filtering correctly excludes HPA replica-only updates, controller status writes, Lease/Token/status subresource writes\r
5. Verify that CoreDNS/kube-proxy/kube-system changes are always included regardless of namespace scope\r
6. Verify that blast radius mapping correctly traces Service selector → Pod → Ingress → Node propagation\r
7. Confirm that low-confidence conclusions are clearly labeled with data gaps\r
\r
---\r
\r
## Best Practices\r
\r
1. Always start with `huawei_change_impact_analyze` for comprehensive change correlation; drill down into domain diagnoser actions only when specific evidence requires deeper analysis\r
2. Find changes first, then map impact, then align with alarms/events/fault time — do not conclude root cause from object updates alone\r
3. CoreDNS, kube-proxy, network plugin, and Ingress controller config changes in `kube-system` must always be included in business fault analysis regardless of target namespace scope\r
4. Deployment HPA-only `replicas` adjustments are noise; image, startup args, probe, resource spec, environment variable, and ConfigMap/Secret reference changes are core changes\r
5. NetworkPolicy/RBAC changes must be correlated with connection timeouts, 403, DNS anomalies, and cross-namespace access failures\r
6. Node taint, cordon/drain, node pool resize, and cluster upgrade changes must be correlated with Pod Pending, Evicted, NotReady, and node events\r
7. All remediation actions must be output as recommendations only and handed off to `huawei-cloud-cce-auto-remediation-runner`\r
8. Clearly label low-confidence conclusions with required supplementary data; never present speculation as fact\r
\r
---\r
\r
## Reference Documents\r
\r
- Four-stage pipeline and risk scoring rules: `references/workflow.md`\r
- Reusable capabilities, gaps, and suggested atomic actions: `references/capability-map.md`\r
- Output field specification and Markdown template: `references/output-schema.md`\r
- Read-only boundaries and remediation handoff rules: `references/risk-rules.md`\r
- [Huawei Cloud CCE Documentation](https://support.huaweicloud.com/cce/index.html)\r
- [Huawei Cloud Python SDK Documentation](https://support.huaweicloud.com/api-cce/cce_02_0113.html)\r
\r
---\r
\r
## Notes\r
\r
1. This skill is read-only analysis and report generation only; no modification of workloads, rollback, ConfigMap/Secret changes, Security Group/ACL/NetworkPolicy/RBAC adjustments, or node cordon/drain/reboot operations\r
2. Do not output the values of HW_ACCESS_KEY, HW_SECRET_KEY, HW_SECURITY_TOKEN, or other environment variables\r
3. All scripts must be executed via `skill action=exec`; do not run them directly in a shell\r
4. Any remediation action must be handed off to `huawei-cloud-cce-auto-remediation-runner`; this skill never executes remediation\r
5. The environment check script must be run before any analysis action\r
6. When using temporary AK/SK, HW_SECURITY_TOKEN must be set\r
7. Cross-skill references: remediation → `huawei-cloud-cce-auto-remediation-runner`; comprehensive root cause → `huawei-cloud-cce-root-cause-analyzer`; workload diagnosis → `huawei-cloud-cce-workload-failure-diagnoser`; network diagnosis → `huawei-cloud-cce-network-failure-diagnoser`; node diagnosis → `huawei-cloud-cce-node-failure-diagnoser`\r
\r
---\r
\r
## Common Pitfalls\r
\r
1. **Concluding root cause from object updates alone** — Always require temporal proximity, event/alarm response, and topology impact evidence; an object update without correlation is insufficient evidence\r
2. **Excluding kube-system changes when scoped to a namespace** — CoreDNS, kube-proxy, and cluster plugin changes are global even when the target namespace is different; always include them\r
3. **Treating HPA replica updates as core changes** — HPA-only `replicas` modifications are noise; only image, probe, resource, env, config reference changes are core\r
4. **Not correlating NetworkPolicy/RBAC with connectivity symptoms** — NetworkPolicy/RBAC changes must be cross-referenced with connection timeout, 403, DNS anomaly, and cross-namespace access failure events\r
5. **Attempting remediation actions from this skill** — All changes must be handed off to `huawei-cloud-cce-auto-remediation-runner`; this skill only outputs recommendations\r
6. **Failing to label low-confidence conclusions** — When evidence is insufficient, write "insufficient evidence" explicitly with data gaps; never present guesses as conclusions\r
7. **Ignoring controller and platform noise** — Lease, Token, status subresource, Node status patch, scheduler binding, and CCE platform-managed RBAC updates must all be filtered out; they are control-plane closed-loop operations, not user changes\r
8. **Not building a fault timeline** — Establish user-perceived fault time, alarm trigger time, Kubernetes event time, and change time before scoring risk
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install huawei-cloud-cce-change-impact-analyzer - After installation, invoke the skill by name or use
/huawei-cloud-cce-change-impact-analyzer - Provide required inputs per the skill's parameter spec and get structured output
What is Huawei Cloud Cce Change Impact Analyzer?
Huawei Cloud CCE change impact analysis skill that converts "what changed before the incident" into provable causal attribution. Use this skill when a CCE in... It is an AI Agent Skill for Claude Code / OpenClaw, with 24 downloads so far.
How do I install Huawei Cloud Cce Change Impact Analyzer?
Run "/install huawei-cloud-cce-change-impact-analyzer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Huawei Cloud Cce Change Impact Analyzer free?
Yes, Huawei Cloud Cce Change Impact Analyzer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Huawei Cloud Cce Change Impact Analyzer support?
Huawei Cloud Cce Change Impact Analyzer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Huawei Cloud Cce Change Impact Analyzer?
It is built and maintained by shijingcheng (@pintudeyudi); the current version is v0.1.0.