fix(installer-agent): edit the Installer CR via apply, not strategic-merge patch#70
Merged
Merged
Conversation
…merge patch The installer-agent prompt instructed editing the Installer CR with k8s_patch_resource. kagent's k8s_patch_resource emits a strategic-merge patch (no --type), which the apiserver rejects for every CustomResource: error: application/strategic-merge-patch+json is not supported by composition.krateo.io/v0-2-105, Kind=Installer ... So the documented agent-driven install could never work through the agent — it only ever worked via helm-apply or operator kubectl. Rewrite the prompt (eng + ita) to the CRD-safe mechanism: k8s_get_resource_yaml -> set field(s) -> k8s_apply_manifest of the COMPLETE manifest (apply performs a merge the CRD accepts; full spec re-applied so no field is dropped). Soften the conceptual "patch" verbs to "set"/"apply". Bump krateo-installer-agent chart 0.1.8 -> 0.1.9 and re-pin in the umbrella. Upstream root-cause fix tracked in kagent-dev/tools#62 (adds patch_type=merge); revert to a merge patch once that ships. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
braghettos
added a commit
that referenced
this pull request
Jul 24, 2026
…-ns types) (#215) portal 1.5.80 -> 1.5.81: compositions-list adds a namespaced krateo-blueprints discovery step so a namespace-scoped tenant's own composition lists. Widget-CR only, no frontend-crd bump. No-op on non-tenant benches (crdsBlueprints 404s → continueOnError → union degrades to krateo-system). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
braghettos
added a commit
that referenced
this pull request
Jul 24, 2026
… UAF migration) (#216) portal 1.5.81 -> 1.5.82: composition-detail/-resources/-events discover types via UAF'd CD list (no more caller-token cluster-wide CRD list → blank detail for tenants); compositions-list migrated to the same UAF pattern. Widget-CR only. No-op on non-tenant benches. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Root cause
The autopilot/installer-agent install flow failed silently: every attempt to enable features on the live
InstallerCR returned onlyexit status 1. Traced to the agent prompt instructing CR edits viak8s_patch_resource, whose kagent tool emits a strategic-merge patch (no--type). The apiserver rejects strategic-merge for every CustomResource:RBAC, CR health, webhooks were all fine — the
InstallerCR even carries alast-applied-configurationannotation, confirming prior installs set features via helm/kubectl apply, never the agent's strategic-merge path. This was the first time the agent itself drove it end-to-end, exposing the documented-but-impossible mechanism.Change
k8s_get_resource_yaml→ set field(s) →k8s_apply_manifestof the complete manifest (applyperforms a merge the CRD accepts; full spec re-applied so no field is dropped). Soften conceptual "patch" verbs to "set"/"apply".krateo-installer-agentchart0.1.8→0.1.9, re-pinned in the umbrella.Upstream fix
Root cause also fixed upstream in kagent-dev/tools#62 (adds a
patch_typeparameter sok8s_patch_resourcecan do--type=merge). Once that ships in the deployed tool server, the prompt can revert to a surgical merge patch.🤖 Generated with Claude Code