Last active
May 17, 2023 07:34
-
-
Save LittleWat/ee726a8f6cefdba66148fb52074190af to your computer and use it in GitHub Desktop.
test-ytt
This file contains hidden or 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
```shell | |
$ ytt -f template.yaml -f schema.yaml -f value-a.yaml -f value-b.yaml | |
channels: | |
b.atopic: <===== This should be `a.atopic` | |
name: atopic | |
b.btopic: | |
name: btopic | |
``` |
This file contains hidden or 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-schema | |
--- | |
namespace: "" | |
topics: | |
- name: "" |
This file contains hidden or 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:data", "data") | |
#@ load("@ytt:template", "template") | |
channels: | |
#@ for topic in data.values.topics: | |
#@yaml/text-templated-strings | |
(@= "{}.{}".format(data.values.namespace, topic.name) @): | |
name: #@ topic.name | |
#@ end |
This file contains hidden or 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 | |
--- | |
namespace: a | |
topics: | |
- name: atopic |
This file contains hidden or 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 | |
--- | |
namespace: b | |
topics: | |
- name: btopic |
Author
LittleWat
commented
May 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment