Skip to content

Commit

Permalink
Merge pull request coreos#482 from bgilbert/sugar
Browse files Browse the repository at this point in the history
docs/development: suggest implementing sugar via config merging
  • Loading branch information
cgwalters committed Aug 3, 2023
2 parents b50dc15 + 893c699 commit 0a1b18e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ variant/version pair with `config`.
- `internal/` —
`main`, non-exported code.

## Adding sugar

Sugar implementations should generally translate the sugar into a fresh Ignition config struct, then use Ignition config merging to merge that struct with the user's config. The desugared struct should be the merge parent and the user's config the child, allowing the user to override field values produced by desugaring.

This approach may not always be suitable, since Ignition's config merging isn't always expressive enough. In that case, it may be necessary to directly modify the user's Ignition config struct.

## Creating a release

Create a [release checklist](https://github.com/coreos/butane/issues/new?template=release-checklist.md) and follow those steps.
Expand Down

0 comments on commit 0a1b18e

Please sign in to comment.