Skip to content

TKE-31: add node pool scaling cookbook#65

Open
wenjiehs wants to merge 1 commit into
tke-workshop:mainfrom
wenjiehs:agent/tke-workshop-doc-change-agent/224af0af
Open

TKE-31: add node pool scaling cookbook#65
wenjiehs wants to merge 1 commit into
tke-workshop:mainfrom
wenjiehs:agent/tke-workshop-doc-change-agent/224af0af

Conversation

@wenjiehs

@wenjiehs wenjiehs commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Closes TKE-31

Doc Change Report

Source issue: TKE-31 修正 ModifyClusterNodePool 节点池扩缩容参数与 cookbook 示例

canonical_doc_path: src/content/docs/basics/node-pool/02-scale-node-pool.md
operation_id: tke.nodepool.scale

修改范围

  • 更新 src/content/docs/basics/node-pool/02-scale-node-pool.md,明确 ModifyClusterNodePool 使用 MinNodesNum / MaxNodesNum,补充本地 Cookbook dry-run 与 confirm-change 示例。
  • 新增 cookbook/node-pool/scale_node_pool.py,默认 dry-run 序列化请求体;只有显式 --confirm-change 才调用 ModifyClusterNodePool。
  • 在 src/data/cookbooks.js 注册 scale-node-pool Cookbook,并补充风险、参数、验证、cleanup 信息。
  • 更新 test/cookbooks.test.mjs,覆盖 scale-node-pool Cookbook 注册和本地脚本引用。

事实来源

  • Tencent Cloud official API doc: https://www.tencentcloud.com/document/product/457/38776,页面显示 Last updated: 2026-05-27 13:00:01。采用理由:官方 ModifyClusterNodePool 入参列出 ClusterId、NodePoolId、MaxNodesNum、MinNodesNum、Labels.N、Taints.N、EnableAutoscale、Tags.N、DeletionProtection 等字段,未列出 DesiredCapacity、MinSize、MaxSize。
  • 仓库内目标文档: src/content/docs/basics/node-pool/02-scale-node-pool.md。采用理由:TKE-31 指定 canonical 修改目标。
  • 仓库内 Cookbook 约定: cookbook/cluster/*.py、src/data/cookbooks.js、test/cookbooks.test.mjs。采用理由:复用现有 Python argparse、dry-run/confirm 和 Cookbook registry/test 风格。

Static Compile

  • node --test test/navigation.test.mjs test/cookbooks.test.mjs test/create-cluster-autoupgrade.test.mjs: passed, 10/10 tests.
  • find cookbook -name "*.py" -print0 | xargs -0 python3 -m py_compile: passed.
  • git diff --check: passed.
  • npm run build: passed, Astro built 194 pages and generated /cookbooks/scale-node-pool/.
  • mkdocs build --strict: skipped; repository has no mkdocs.yml or mkdocs.yaml.

Dry Run Compile

  • python3 cookbook/node-pool/scale_node_pool.py --help: passed.
  • python3 cookbook/node-pool/scale_node_pool.py --cluster-id cls-xxxxxxxx --node-pool-id np-xxxxxxxx --region ap-guangzhou --enable-autoscale true --min-nodes-num 3 --max-nodes-num 20 --tag billing=virgilliang: passed; serialized ClusterId, NodePoolId, EnableAutoscale, MinNodesNum, MaxNodesNum, and Tags without calling Tencent Cloud APIs.
  • No real Tencent Cloud resources were created, modified, or deleted.

Live Verify

  • Required. This PR changes operation guidance and a Cookbook for ModifyClusterNodePool, which can modify a real TKE node pool and may create/release compute resources through autoscaling.

剩余人工确认项

  • No API contract conflict found in official source used above.
  • Production scaling policy, quota choice, and real node-pool execution remain Live Verify / human operational decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant