YAML templating tool that works on YAML structure instead of text
APACHE-2.0 License
Bot releases are visible (Hide)
Published by cppforlife over 4 years ago
overlay/match
or overlay/replace
+
to indicate missing_ok within data values passed in via cmd line argsoverlay/replace
for each data value specified in cmd line or env varoverlay.(and|or|not)_op
to support basic logic operations-o
for --data-values-inspect
and --files-inspect
results--version
flag in addition to version cmd--output-directory
flag now creates destination directory entirely before creating it againImprovements to error messages:
9275cd3033ec0276d0428cb73d4b5de87720491fc3261a1183a14d9344d8bfc6 ./ytt-darwin-amd64
ea740f72a1825c00eabf83bfd6cb366adf4b2486992603d6850fac8487e92d8f ./ytt-linux-amd64
1bc2d856ebc5b3d4085fbf470b5793ddc551dff9325458d801e4b9202c2fbb20 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 4 years ago
84a5aa9a9d5c3b67f21136542ecb73aa2c809298094fea21edffb4d2a0cb2f0d ./ytt-darwin-amd64
2ccd2c74fea87748515ed3fd74cd45c31f91472fabadf42e6a958f52312e3b47 ./ytt-linux-amd64
e8d6cadb6b875adff3cc3bd33c5da82323466999511dcac28a04e1c895d05c8e ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife almost 5 years ago
/
syntax
#@ load("/file.lib.yml", "func")
#gist:<id>
support for ytt playground
@overlay/assert
annotationdad9e162745fe2e394b3b8c798182357e5cb4caedba57d2ce0aafda6c6520418 ./ytt-darwin-amd64
c3f1d4f04108ac1626c9b9036c7d4e407d4ff09f2577953ad72b6dc7adadbd39 ./ytt-linux-amd64
871b096337ec54648dd8c9c5ff4d6ae3308036c07005eafa4d57d5a6ce0fdac6 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife almost 5 years ago
@ytt:library
module to allow programmatic evaluation of libraries (doc)
f246ad0d41aff28fd2be1d2b95f2e974d6221bde869c9f430021a4f882822ee9 ./ytt-darwin-amd64
a6ef8df88c3b18044842c984f05d2e4472b3f354d42a63d3497757123e1fe108 ./ytt-linux-amd64
17a910e2857aac653b1c43709c71c7eaa64a40745cfe99603bb4935d0fcef220 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife almost 5 years ago
@overlay/match-child-defaults
(https://github.com/k14s/ytt/issues/65)b9e1f2fcfc760fbb35967cafa82078bdf331c04a7b0dcb550cdbc2d8250e6308 ./ytt-darwin-amd64
7143f8c1300ae13fd7b5ed53abc02867a86b6329afaa85413eb767eddf189639 ./ytt-linux-amd64
1b09cb3a8cb346f853147da0b937685662113afdb63963deb055c6ef0dbce345 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife about 5 years ago
hasattr
for data.values
when key is not there (issue https://github.com/k14s/ytt/issues/56)05bc4510c3212d3926bf431456fdbeedf635158d4e0e225ec028dce71ff638d7 ./ytt-darwin-amd64
88c755c31a4d85d0bdb7a32e7ee34a93c45222a14f4f6204ce65e0da8875452f ./ytt-linux-amd64
6197c5a0c19c96c3252b1dc548e2add4a6b52fb0340c784143c4e1749a7199c5 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife about 5 years ago
load statement
docs
@overlay/match-child-defaults
annotation to avoid verbose missing_ok=True
@ytt:url
module to encode/decode URL components https://github.com/k14s/ytt/issues/52 (doc)ytt fmt
569191402672a42c5919feb1caad5a13fb41c01b2d849467211d32f66fd7d426 ./ytt-darwin-amd64
a5759302fe28157cda0c9015d41d1b6901f0f03ae184f168dd40521012426219 ./ytt-linux-amd64
f44f6a0644526a5dea3203030531f172de90633110320643b4f4ce23902ca35f ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife about 5 years ago
struct.encode
and struct.decode
methods (doc)
data.values
to obtain plain map or list valuesvia=Function
keyword arg for @overlay/replace
annotation (doc)
b64726d2ad5cb6edd31f4614f3e8bdb07bf6238466cd73a5104bc868afd04b70 ./ytt-darwin-amd64
9a2e5660db970c76a7cadfbcf145b65119854aa3f259550335ae8485a2b8f160 ./ytt-linux-amd64
6913debdbfa3e31fb158abbea51b45e61170f56571ccf33084471b8e47016752 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife about 5 years ago
--allow-symlink-destination
and --dangerous-allow-all-symlink-destinations
flags
ytt -f config.yml=<(echo 123)
as on Linux /dev/fd/x
is a symlink812b19e007ff1e5a54a8923cd311b73a580ca823f60be53338addd2657d32212 ./ytt-darwin-amd64
86fdeb00432079209ddec7e2a780f8c8d3faa71dd9f87aed439bb134f0dcfb10 ./ytt-linux-amd64
9bed915a6d4c437d14ac7a85a1bb725f2d09c5eb9c233a6839849afb24b746b6 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife about 5 years ago
--data-value
and --data-value-env
to interpret values as strings by default (doc)
--data-value-yaml
or --data-value-env-yaml
--output
to --output-directory
flag, and --output-type
to --output
-o json
works as expected now)@yaml/text-templated-strings
annotation to enable text templating for a YAML node(@
in values, e.g. for JSON pathkey_(@= i @): #@ i
would work (though see item above on how to enable this)ytt -f file.yml=<(...)
--strict
mode for YAML parsing (doc)91a9dd9de10773b9f938e7b4e4f8169176caaff199d73cede67a07c96d4badd7 ./ytt-darwin-amd64
c7dbed3ce2008ee2fb5f2fadef999b3aa7853ff960daf9c3b8b54831b448effe ./ytt-linux-amd64
e639909feba750726095282d9e4150f99ef5f81bf78facf1da44f2d53eca89f4 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife about 5 years ago
hash()
per discussion in slack
e6345524ca9229d42828a2cd700557ced1d61f00655a09c9e2f1535c49dfd52b ./ytt-darwin-amd64
611f0d0113a5b003021294ba97fdd2db3da5e85f33dc79122eaea3128ebe7d89 ./ytt-linux-amd64
912ce7a5729c414786e6b7cb1c938b62f08693ee15dd0c4b95c451817740d763 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 5 years ago
yaml.encode(...)
to encode YAML fragments as shows in this example (https://github.com/k14s/ytt/tree/master/examples/k8s-config-map-files)6dbed6e99643b28dcb9a19612a56d2d052a2ba2eace392b95892fef394103ecf ./ytt-darwin-amd64
180e209f6c5a28726b3fe628aee3a6c2ec680b712591777af46b1721a98f04b1 ./ytt-linux-amd64
39e047ac7483e91a6f7271986e43effde45383790b3b14bb71dfa1d5cd186d4b ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 5 years ago
--file-mark=file.txt:type=text-plain
--file-mark=file.yml:type=yaml-plain
for templates that include text templates within strings
key: (@= ... @)
now will be kept as is--output-type=yaml|json|pos
flag to control how to print combined output
pos
type is useful to determine what modified particular section of the file5783352d5a4818549e48e4b1d9e18a5db55455b1597bc58c143992c596dfd1f4 ./ytt-darwin-amd64
20b644eea48c7580d9aa205378aef1211821e6a233d92cc8b1df26acf73773c6 ./ytt-linux-amd64
30a6547681049ff46d07b2b984af14a0e8931cf198a907f89c8cb68df6a927a6 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 5 years ago
data.values
is null
because it was not yet resolved)--files-inspect
flag to display file order (order matters for merging data values and overlays)c786ce096e1281c57c573f1bb4abc1082537e05a41e8918b07b4c38e84676793 ./ytt-darwin-amd64
5875054e5beb46b9085a9fccbf32496d5f3f026c5bdfdd9fcc04414f0f8b0872 ./ytt-linux-amd64
90ca2bca9068b7c294249ab8c5c72ff3ac0b6c692d922e92e3a8ced39852628f ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 5 years ago
--ignore-unknown-comments=bool
flag to configure whether unknown comments are considered as errors
ytt playground
command to ytt website
to be consistent with other k14s tools7693a957124f73c610f48f39151a5fdacc2246f90be9309e9c67c5405cf9c8cc ./ytt-darwin-amd64
9b9dc910b7097c72cfc63df8e1257ae15105dccff1094119909fd834730e0478 ./ytt-linux-amd64
1d994a824eb6d8bf4d5b638caf91c1ae93a183c049bc193c9939d520a42be2b6 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 5 years ago
template
command top level
ytt -f ...
in addition to ytt template -f ...
4966b6b3ffc7691a06fd7e183a623a2dc77cd8f7725ce7a843a8829500587c5b ./ytt-darwin-amd64
08b25d21675fdc77d4281c9bb74b5b36710cc091f30552830604459512f5744c ./ytt-linux-amd64
0a5376f97acad9f395f89e756b174968040a1faa122a703d55c356a75de1a2b5 ./ytt-windows-amd64.exe
(Installation instructions: https://k14s.io/#install-from-github-release)
Published by cppforlife over 5 years ago
-R
flag, and allow use of directories by default--data-value
flag with values that include commas2850480a1836b969978cfa32ca2080508bd93c7705f8f267d6aeb01c6bbca114 ./ytt-darwin-amd64
5994d7a3a1692193ccad194614fda2d7b30b0c906a4ab47e5e2e989b0464af2d ./ytt-linux-amd64
c0d4a5a5fb95180903b569a3bb094fdc3142150f968c1dd97359dd48d9c7e392 ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
template
command
nil
data values via --data-value
flag--data-values-inspect
flag to list data values that will be available to templates-v
as a shorthand for --data-value
flag183f8e2ac58c7ddc69804d775dc6ada08e4d9e57fb4aa9006dc53f015a6cd842 ./ytt-darwin-amd64
f1bccd1dcc3410099f883d9d7ba91bf49f0b096202af9c114d7450028a96c24b ./ytt-linux-amd64
9aa12b4a1aa15ed114fa32ef463de08da65584506093bc1a8009b4efe3d41715 ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
template
command
--data-value
flag and friends to set data values from command line or environment variables (docs)
ytt t -R -f config/ --data-value push_images=true --data-value push_images_repo=docker.io/dkalinin
15fc83ce80eac8d594495c768972492fc5b977cb71ee2d4429788e9e893d47ea ./ytt-darwin-amd64
41de73008f81e2b072718557689f109087fc64911281fa2b569a4fc6d3d88cf4 ./ytt-linux-amd64
c08ae79ee7b76ccadf732168ffac0ba7c35df6e721f342f825e75621c8506fed ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
int
value comparison in overlay.map_key
matcheraea8e18b8c634fa95007d8c2e10505cfeb17960fba3edf74ca5034010e1b2325 ./ytt-darwin-amd64
30764e32dab4cdaca432446afc75b07b13e6cdc2b5a6bd474a5b82bef13da60f ./ytt-linux-amd64
796e5205f64f46e4a21782a78b65b19d5d6130b744c5e20f412a68b4a60611af ./ytt-windows-amd64.exe