flatcar, openshift, and r4e all want to prevent certain Ignition fields from being used. Rather than open-coding a filter function at the end of each spec's translation pass, add a generic filter mechanism that maps filter expressions onto errors. The filter expressions are strings similar to ContextPath but without slice indexes. This is a breaking API change, since config/util.Translate() now requires a config object with a FieldFilters() method.
Adjust context paths in some existing checks to be compatible with this approach.
Use the new API from https://github.com/coreos/ignition/pull/1622 to connect the new filter mechanism to docs generation. This allows us to remove unless: directives from the doc YAML (and from Ignition's doc generator) and automatically omit fields that are filtered in each spec.
The refactor makes the flatcarclevis filter more strict, including in stable specs; it now triggers on clevis sections with only irrelevant secondary fields. Any config newly affected by this was at least misleading if not outright incorrect.
flatcar
,openshift
, andr4e
all want to prevent certain Ignition fields from being used. Rather than open-coding a filter function at the end of each spec's translation pass, add a generic filter mechanism that maps filter expressions onto errors. The filter expressions are strings similar toContextPath
but without slice indexes. This is a breaking API change, sinceconfig/util.Translate()
now requires a config object with aFieldFilters()
method.Adjust context paths in some existing checks to be compatible with this approach.
Use the new API from https://github.com/coreos/ignition/pull/1622 to connect the new filter mechanism to docs generation. This allows us to remove
unless:
directives from the doc YAML (and from Ignition's doc generator) and automatically omit fields that are filtered in each spec.The refactor makes the
flatcar
clevis
filter more strict, including in stable specs; it now triggers onclevis
sections with only irrelevant secondary fields. Any config newly affected by this was at least misleading if not outright incorrect.