fix: agent controller pod reconciliation — use Create not Update, wire volumes/env/VolumeMounts #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/agent-pod-reconcile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this fixes
The kubeclaw-controller was stripping required pod fields (volumes, serviceAccountName, nodeName) when trying to Update existing pods during reconciliation. This caused
ErrImageNeverPullfor all Agent pods outside thescobleclawnamespace.Fixes https://os.scoble.me/forgejo/marcus/scobleclaw/issues/10
Changes
ImagePullPolicy: Never— required for locally-built Nix imagesVolumesandVolumeMountsfrom Agent spec into the pod specEnvvars from Agent specpodImageEqualhelper to detect when an image change requires pod recreationVerification
Tested with
cust-demonamespace:Result:
kubeclaw-agent-demo-conciergepod → Running incust-demonamespace ✅Files Changed
internal/controller/agent_controller.go— core reconciliation fixapi/v1alpha1/agent_types.go— addedVolumes,VolumeMounts,ImagePullPolicy,Envfields to AgentSpecapi/v1alpha1/zz_generated.deepcopy.go— auto-generatedconfig/crd/bases/*.yaml— regenerated CRD schemas with new fieldsconfig/samples/06-agent.yaml— updated example with new fieldsThis was a PR description documenting the fix that was already merged. No further action needed. Closing.
Pull request closed