一键导入
talos-config-editing
How to edit Talos node configs in this repo: which file for which change, strategic merge patch rules, and how to add new config documents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
How to edit Talos node configs in this repo: which file for which change, strategic merge patch rules, and how to add new config documents.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Audit CloudNativePG (CNPG) clusters for backup health, S3 storage bloat, and disk-space risk — schedule misconfiguration, WAL/archive_timeout churn, orphaned backups, compression, and PVC resize status. Use when investigating CNPG backup storage growth, a "storage near empty" alert on the backup target (e.g. QNAP), a crash-looping/"Not enough disk space" CNPG cluster, or doing a periodic CNPG health check.
Push an updated Coder workspace Terraform template and redeploy running workspaces onto it. Use when workspace-template/main.tf changes (resources, volumes, etc.) need to reach live Coder workspaces.
Diagnose and fix ONLYOFFICE Document Server showing "An error has occurred while opening the file" with no failed requests visible in the browser. Root cause is usually an orphaned task_result row in the docserver's Postgres DB, left over from a conversion interrupted by a pod crash/OOM/restart.
Task commands, bootstrap sequence, CI/CD, branch/PR workflow, linting, and devcontainer setup for the home-ops repository.
Use when auditing disk health, filesystem usage, or I/O on cluster nodes — especially when filesystem queries return incomplete results or a node's second drive is missing from metrics.
Use when removing, replacing, or decommissioning a Talos node — covers the correct talosctl reset workflow
| name | talos-config-editing |
| description | How to edit Talos node configs in this repo: which file for which change, strategic merge patch rules, and how to add new config documents. |
| when_to_use | Trigger phrases: "edit talos config", "add talos extension", "change sysctl", "modify kubelet", "add node label", "talos machine config", "new config document", "ExtensionServiceConfig", "talos patch", "per-node config". |
task talos:generate builds each node's final config as:
envsubst < templates/controlplane.yaml → base v1alpha1 document
talosctl machineconfig patch … --patch @nodes/{name}.yaml → node-specific overrides
envsubst < templates/extension-nut-client.yaml >> … → appended ExtensionServiceConfig doc
mv … clusterconfig/home-{name}.yaml
Output in clusterconfig/home-{name}.yaml is multi-document YAML.
| Change type | File to edit |
|---|---|
| Shared machine config (sysctls, kubelet, features, CRI, NTP) | templates/controlplane.yaml |
| Shared cluster config (apiServer, etcd, networking) | templates/controlplane.yaml |
| Per-node: hostname, IP address, VIP, extra interfaces | nodes/{name}.yaml |
| New Talos system extension service config | New template file + append in Taskfile |
| New config document (EthernetConfig, KmsgLogConfig, etc.) | New template file + append in Taskfile |
Never edit clusterconfig/home-*.yaml directly — it is regenerated by task talos:generate.
Patches in nodes/ are partial v1alpha1 documents — only keys to override.
cluster.network.podSubnets and cluster.network.serviceSubnets are replaced entirelymachine.network.interfaces[] merges on matching interface: or deviceSelector: key — a patch entry for eth0 updates the existing eth0 entry, it does not add a second oneConfig documents that are not v1alpha1 (e.g. ExtensionServiceConfig, EthernetConfig, KmsgLogConfig) are separate YAML documents appended after the main config, not nested fields.
provision/talos/templates/{doc-name}.yaml starting with ---:---
apiVersion: v1alpha1
kind: ExtensionServiceConfig # or EthernetConfig, etc.
name: my-extension
# ... fields
.taskfiles/talos/Taskfile.yaml generate task:envsubst < templates/{doc-name}.yaml >> /tmp/talos-patched.yaml
Add it before the mv line. Use envsubst < if the template has ${VAR} tokens, plain cat if not.
task talos:generate # re-render clusterconfig/
# inspect clusterconfig/home-mc1.yaml to verify output
task talos:apply N=mc1 # apply without reboot (auto mode)
# or
task talos:apply:restart N=mc1 # apply + reboot (for changes that require it)
Changes requiring a reboot: kernel args, extension installs, install image changes. Changes that apply without reboot: most machine config fields (kubelet, sysctls, network config).