eve icon indicating copy to clipboard operation
eve copied to clipboard

Merging of image yml files

Open deitch opened this issue 5 years ago • 0 comments

This is a discussion issue to figure out how we handle multiple image yml files. As of this writing, and the recently merged #849, we have multiple rootfs image files:

  1. A core rootfs.yml which contains all of the common information for images
  2. A patch file per unique build, e.g. Xen or KVM or RPi

Actually, each is a .yml.in which then is merged and patched, but getting past .in files is a separate discussion.

The problem with using patch files in this use case is that they are brittle. They have very specific lines that you add/remove/change. This works well for source code, where lines have little inherent structure. yml (and json) are by definition structured and easy to patch. There even are RFC standards for json patch and json merge patch.

The kubernetes version of strategic merge patch is even easier, but depends on some annotations.

A JSON Patch to replace rootfs-acrn.yml.in would look something like:

deitch avatar Apr 10 '20 08:04 deitch