-
-
Save cppforlife/9632168312aa01463e45659ad277c031 to your computer and use it in GitHub Desktop.
ytt templating, how to combine values from two yamls into third? NOT WORKING, HELP NEEDED.
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:data", "data") | |
metadata: #@ data.values.cluster_metadata | |
platform: #@ data.values.platform |
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
#! this file defines possible values consumed by config.yml (it effectively acts as basic schema) | |
#! other data values are overlayed on top of this file. | |
#@data/values | |
--- | |
platform: | |
vsphere: | |
username: "" | |
password: "" | |
pullSecret: "" | |
sshPubkey: "" | |
cluster_metadata: | |
name: "" |
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
#! this file fills secret info | |
#@data/values | |
--- | |
platform: | |
vsphere: | |
username: "username-value" | |
password: "password-value" | |
pullSecret: "pullSecret-value" | |
sshPubkey: "ssh-rsa pubkey value" |
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
#! this fills in other generic non-secret info | |
#@data/values | |
--- | |
cluster_metadata: | |
name: demo |
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
requires to run ytt -f . or ytt -f config.yml -f default-values.yml -f demo-secrets.yml -f demo-values.yml to "order" data values properly | |
expected result: | |
``` | |
metadata: | |
name: demo | |
platform: | |
vsphere: | |
username: username-value | |
password: password-value | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment