Skip to content

Commit

Permalink
docs/development: suggest implementing sugar via config merging
Browse files Browse the repository at this point in the history
  • Loading branch information
bgilbert committed Aug 3, 2023
1 parent b50dc15 commit 893c699
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 893c699

Please sign in to comment.