| I just encountered the brokenness with knockout_prefix in Hiera's deep merge. I understand that might be a tricky problem to fix, but adding knockout_prefix to Hiera's unique lookup would be relatively easy code. Since Eric Sorenson asked for use-cases above, I was trying to implement a "feature_flag" Hiera setting, implemented as an array of strings. I wanted to be able to list the feature flags but also to negate them as an earlier (more specific) Hiera level, in this case to opt out a small set of customers (who are currently in an extended change freeze) from what would be an otherwise global change on a particular platform type. The deep merge knockout_prefix appeared to work in simple testing, but it is a good thing I did a final full-catalog compile test with octocatalog-diff and caught the problem or I would have ended up violating the customers' change freezes. I ended up whipping up a quick Ruby function applied in the module after Hiera APL that still allowed me to use Hiera's unique merge and get the knockout feature flag behavior for the final set of enabled feature flags, but it would be much cleaner if it were just an option in Hiera's unique merge itself. |