Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Created June 30, 2022 13:59
Show Gist options
  • Save pivotaljohn/d475073d230a7424f1612e565bf76198 to your computer and use it in GitHub Desktop.
Save pivotaljohn/d475073d230a7424f1612e565bf76198 to your computer and use it in GitHub Desktop.
Insert options for an array, when it exists.
#@ load("@ytt:data", "data")
--- #@ data.values
#@data/values
---
services:
- url: /api/v1
- url: /api/v2
#@ load("@ytt:overlay", "overlay")
#@data/values
#@overlay/match-child-defaults when="0+"
---
services:
#@overlay/match by=overlay.subset({"url": "/api/v1"}), when=1
- options:
hostname: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment