feat: k8s write tools - #76
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds scope-gated Managed Kubernetes write operations with confirmation flows, validation, PUT carry-forward handling, documentation, and tests.
Changes:
- Adds cluster, node-pool, and node write tools.
- Adds validation, asynchronous-operation guidance, and destructive-action classification.
- Expands integration tests and Kubernetes documentation.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
main.go |
Wires scoped Kubernetes registration. |
tools/scope.go |
Classifies recreate_ as destructive. |
tools/inputs.go |
Defines Kubernetes write inputs. |
tools/k8s/async.go |
Adds asynchronous-operation notices. |
tools/k8s/cluster.go |
Annotates cluster read tools. |
tools/k8s/cluster_write.go |
Implements cluster writes. |
tools/k8s/node.go |
Annotates node read tools. |
tools/k8s/node_write.go |
Implements node recreation and deletion. |
tools/k8s/nodepool.go |
Annotates node-pool read tools. |
tools/k8s/nodepool_write.go |
Implements node-pool writes and PUT carry-forward. |
tools/k8s/register.go |
Registers read and write tools. |
tools/k8s/validate.go |
Adds Kubernetes input validation. |
tools/k8s/versions.go |
Annotates version read tools. |
test/setup_test.go |
Shares confirmation state in tests. |
test/dynamic_test.go |
Updates dynamic registration. |
test/k8s_test.go |
Tests read-only annotations. |
test/k8s_write_test.go |
Tests write behavior and safeguards. |
README.md |
Documents Kubernetes write support. |
CHANGELOG.md |
Records the new feature. |
CLAUDE.md |
Adds implementation guidance. |
docs/k8s/cluster.md |
Documents cluster writes. |
docs/k8s/node.md |
Documents node actions. |
docs/k8s/nodepool.md |
Documents node-pool writes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cavramoniu-ionos
marked this pull request as ready for review
August 12, 2026 11:15
cavramoniu-ionos
requested review from
adeatcu-ionos,
avirtopeanu-ionos,
cristiGuranIonos,
mimihalescu and
rmocanu-ionos
August 12, 2026 11:15
avirtopeanu-ionos
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Managed Kubernetes write tools to the MCP server, off by default behind
IONOS_MCP_TOOL_SCOPE. Also moves the 8 existing k8s read tools onto the scope-gated registration path so they carryreadOnlyHintannotations.Adds
create_k8s_cluster,update_k8s_cluster,delete_k8s_clustercreate_k8s_nodepool,update_k8s_nodepool,delete_k8s_nodepoolrecreate_k8s_node,delete_k8s_noderecreate_action verb — aPOSTclassified destructive, since it discards the nodewrite/ 195 withdestructivePUT carry-forward
Both k8s update endpoints are
PUT, notPATCH, so the API replaces the resource's properties. Both update tools read the resource first and send back whatever the caller omitted — without it, an unrelated change sendsnodeCount: 0and drains the pool, or drops a cluster'sapi_subnet_allow_listand exposes its Kubernetes API server.API behaviours found by live testing
nameis immutable (Attribute is immutable, therefore not allowed in update requests) — removed as a parameter and never sentautoScaling {0,0}, which the API rejects on write — no longer carried forward422on zero bounds, silently ignored when omitted. Rejected up front rather than reported as a success that changed nothingdelete_k8s_nodeis not a reliable replace: the node goes first, and an active autoscaler can hold the pool at the smaller size (observed 2 nodes → 1). Userecreate_k8s_nodeinsteadtaintsisx-internalin the spec, so it is not exposed, but existing taints are still carried forwardValidation
Enums and shapes validated against the CloudAPI spec (storage type, availability zone, weekday, RAM multiples, autoscaler bounds, public-IP spare rule).
cpu_familyflagged deprecated in favour ofserver_type; private-cluster fields flagged prerelease.Testing
golangci-lint0 issues