Add configmap checksum annotation and pod scheduling support#19
Conversation
Add checksum/config annotation to trigger pod restart on ConfigMap changes, and add nodeSelector/tolerations/affinity fields for flexible pod scheduling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🤖 PR ReviewBranch: 📊 Summary
Status: ✅ Ready to merge — remaining items are deferred to follow-up PRs 🟡 Important Issues1. ⏭️ Checksum annotation contradicts init-config logic (pre-existing)File: Problem: The init-config container skips copying Decision: Deferred to a separate PR. This is a pre-existing issue and changing init-config behavior may affect existing users who rely on manual config edits surviving upgrades. 2. ✅ Simpler checksum approachFile: Fixed: Changed from 💡 SuggestionsView 5 suggestions (3 addressed)
✨ Strengths
📋 Type Design RatingsNot applicable — this PR modifies Helm chart YAML templates, not typed programming constructs. 🎯 Action PlanBefore Merge:
After Merge (Backlog):
Generated by pr-review-and-document skill | Round 2 |
- Use .Values.config | toJson for checksum instead of BasePath reference - Add usage context and independence note to README Pod Scheduling section - Add inline comments for nodeSelector/tolerations/affinity in values.yaml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
thepagent
left a comment
There was a problem hiding this comment.
Hi @aehrt55, thanks for the clean PR — this is exactly the kind of standard Helm pattern that was missing.
The implementation looks good — {{- with }} pattern is idiomatic, nindent 8 is correct, and using .Values.config | toJson | sha256sum is cleaner than a template path reference.
One thing worth noting: the checksum annotation will trigger restarts correctly, but the init-config container skips copying openclaw.json if it already exists on the PVC, so the new config won't actually take effect on restart. This is a pre-existing issue unrelated to your changes — happy to track it in a follow-up.
Merging as-is. Thanks again!
Hi! Thank you for maintaining this chart — it's been great to work with.
We've been using openclaw-helm to deploy multiple OpenClaw instances on EKS and ran into two gaps that this PR addresses:
Changes
1. ConfigMap checksum annotation on pod template
Adds a
checksum/configannotation tospec.template.metadata.annotationsin the Deployment. This is a common Helm pattern that ensures pods automatically restart when the ConfigMap content changes (e.g., updatingopenclaw.jsonvia values).Without this, changing config values requires a manual
kubectl rollout restartsince the Deployment spec itself doesn't change.2. Pod scheduling fields (
nodeSelector,tolerations,affinity)Adds the standard Kubernetes scheduling fields to
values.yamlanddeployment.yaml. These default to empty (no behavioral change for existing users) but allow operators to control pod placement on multi-node clusters.This is a standard convention in most Helm charts (e.g., Bitnami, ingress-nginx) and is useful for:
3. README documentation
Added a "Pod Scheduling" section with usage examples for the new fields.
Backwards Compatibility
All changes are fully backwards-compatible:
Testing
Verified with
helm template:Happy to adjust anything if you'd prefer a different approach. Thanks for considering!