Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Created April 27, 2021 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pivotaljohn/281e6c3d1d77c7e2b1e4763a0f400add to your computer and use it in GitHub Desktop.
Save pivotaljohn/281e6c3d1d77c7e2b1e4763a0f400add to your computer and use it in GitHub Desktop.
Contained overlay directives
---
foo: 42
bar:
ree: deadbeef
quuz: prefix
list:
- zeroth
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.all, expects="1+"
---
#@overlay/match missing_ok=True
bar:
#@overlay/match missing_ok=True
#@overlay/remove
qux: toasty
#@overlay/match missing_ok=True
baz: added from overlay
#@overlay/match when=1
#@overlay/replace via=lambda left,right: left + "-" + right
quuz: suffix
#@overlay/match missing_ok=True
list:
- first
#@overlay/insert after=True
- second
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment