Skip to content

Add OpenKruise tutorial with CloneSet and Advanced DaemonSet in-place update. - #78

Open
fujitatomoya wants to merge 1 commit into
mainfrom
issue-66-openkruise-tutorial
Open

fujitatomoya wants to merge 1 commit into
mainfrom
issue-66-openkruise-tutorial

Conversation

@fujitatomoya

Copy link
Copy Markdown
Owner

Closes #66

Adds docs/ROS2_Deployment_OpenKruise.md that walks through the OpenKruise features that are useful for ROS 2 / robot fleets on the edge, with two manifests and README links.

  • Why OpenKruise for robotics / edge: Deployment / DaemonSet recreate the pod on update (new name / IP, DDS re-discovery, emptyDir such as /dev/shm lost, image pull on the edge network). In-place update restarts only the changed container in the same pod.
  • CloneSet (yaml/ros2-kruise-cloneset.yaml): InPlaceIfPossible, partition canary (2 of 3 pods stay on the old revision), then full rollout. The doc shows the pod names / IPs unchanged, RESTARTS 1, kubelet event Container ros2-talker definition changed, will be restarted and the apps.kruise.io/inplace-update-state annotation.
  • Advanced DaemonSet (yaml/ros2-kruise-daemonset.yaml): rollingUpdateType: InPlaceIfPossible with node selector (ros2-rollout=canary) to roll out to the labeled node (robot) first, then remove the selector for the whole fleet.
  • Short list of the other CRDs worth looking at (ImagePullJob / pre-download, SidecarSet, ContainerRecreateRequest, WorkloadSpread, PodUnavailableBudget) and the note that kruise-daemon on KubeEdge edge nodes needs MetaServer (not covered).
  • An important pitfall found during the verification is documented: kubectl patch --type merge with a containers list replaces the whole list and drops command / args / imagePullPolicy, which turns the change into a pod recreation with the image default command (and imagePullPolicy: Always). The doc uses JSON patch (--type json) on the image field only.

Verification

kind v0.33.0 (Kubernetes v1.37.0) + Cilium 1.20.2, helm install kruise openkruise/kruise --version 1.9.2, images tomoyafujita/ros:jazzy -> tomoyafujita/ros:rolling (both built locally and loaded with kind load docker-image). All outputs in the doc are copied from the run. helm uninstall kruise and the sample resources were cleaned up afterwards. codespell --config codespell.cfg passes.

🤖 Generated with Claude Code

… update.

Introduce OpenKruise advanced workloads for ROS 2 deployment on the
edge: in-place update keeps the pod name, IP address, sandbox and
volumes and only restarts the changed container, partition based
canary rollout, and Advanced DaemonSet rollout by node selector to
update the specific robots first.

- docs/ROS2_Deployment_OpenKruise.md: motivation, Helm install
  (v1.9.2), CloneSet in-place update with partition, Advanced
  DaemonSet node selector rollout, other useful CRDs, uninstall
- yaml/ros2-kruise-cloneset.yaml, yaml/ros2-kruise-daemonset.yaml
- README links

Verified on kind v0.33.0 (Kubernetes v1.37.0) with Cilium 1.20.2 and
OpenKruise v1.9.2, image update from tomoyafujita/ros:jazzy to
tomoyafujita/ros:rolling.

Closes #66

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce OpenKruise advanced CRDs, that are useful for edge use cases

1 participant