Last active
July 8, 2022 19:37
-
-
Save warroyo/34add0cab0079e54ebd93388d0839119 to your computer and use it in GitHub Desktop.
ytt testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
extrapools: | |
- name: tkg-aws-wc-np-1 | |
replicas: 2 | |
az: us-west-2b | |
nodeMachineType: t3.large | |
autoscaler_min_size: 2 | |
autoscaler_max_size: 5 | |
tags: | |
will: testing | |
will3: testing | |
labels: | |
key1: hello | |
key2: value2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
additionalTags: | |
test1: testing | |
test2: testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:overlay", "overlay") | |
#@ load("@ytt:yaml", "yaml") | |
#@ load("@ytt:data", "data") | |
#@ def merge_tags(pool): | |
#@ tags = {} | |
#@ if hasattr(pool, "tags"): | |
#@ tags.update(pool.tags) | |
#@ end | |
#@ return lambda left, right: dict(yaml.decode(yaml.encode(left)).items() + tags.items()) | |
#@ end | |
#@overlay/match by=overlay.all | |
#@ for i in data.values.extrapools: | |
--- | |
#@overlay/replace via=merge_tags(i) | |
additionalTags: | |
#@ end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment