YAML templating tool that works on YAML structure instead of text
APACHE-2.0 License
Bot releases are hidden (Show)
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
Published by cppforlife over 5 years ago
-f
flag (example: ytt template -f <(echo "---")
) (fixes https://github.com/k14s/ytt/issues/12)5bb61ca3ffdaa37cb9aa3f655fe3ec7df5b5b64119d7cc9571a775852b78ba91 ./ytt-darwin-amd64
975b811dcb591b2bc6446cdeaab4b934545dea340eb7f8222a83efe34e99deda ./ytt-linux-amd64
f99cfab70a53d18b7258cbcc773e1abc3b0f1153416ab6e37a929570ff98b6ad ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
043b98b2425496ebf88f9c2d0ad4c3fdba12fb4037e99fa8a44499100ad0e486 ./ytt-darwin-amd64
340a3bd30c925f865b53762e3c54b88843b2d0b898fbb58e2deb003ea182df26 ./ytt-linux-amd64
d99fb6f7a0d8f1e08176c27c65d3023b60bff322b83f756db24da5741a45354c ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
--file-mark
to support configuring file metadata
--file-mark config.yml:path=other-config.yml
--file-mark config.yml:exclusive-for-output=true
--file-mark config.yml:type=yaml-plain
(yaml-template
, yaml-plain
, text-template
, text-plain
, starlark
, data
)1fb2cc9ccb516bba9fb3e042849d2fbb68b73768dcfbe718cdc385618602fe59 ./ytt-darwin-amd64
5205c22c5bd5a34c2d6f63e9870d70a7272d33d01dcbace2c5fbefcca85e00aa ./ytt-linux-amd64
4e5cf4e97a407d2bf53df05a0df5e34f96e3e0017b5604497454d840cc96ff67 ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
@overlay/remove
to get rid of array items and documents, without leaving nil
s in ASTaf316b851261a7f0e5e93c111e7a466ccbc3100654c4f868e9b72af26269f2a4 ./ytt-darwin-amd64
c12a2078d3d5e851dfb32a799b3ccb8b4b9fa082b37d18d04e4ab098c2432f09 ./ytt-linux-amd64
52d02464f44bf2dc7b7fac32ec1b51614e8054e1581e8ed6286f8a4ad250005c ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
2e49c7ef41a655b35ac192f40b9fd4c62cd05c177d6d24faecbdf054677d2c95 ./ytt-darwin-amd64
6e6e904d0966fbfe4f6c9736b84396e86d6af9edb720caca2ad34ac243d47d52 ./ytt-linux-amd64
8c9197f3b645e30d44471a04f7dce86cc79eaaf5b79b8219442111bfd8d632af ./ytt-windows-amd64.exe
Published by cppforlife over 5 years ago
ytt template
command
e771415781af72ca2dc8288f5a2d9bf617fe6a81fc3a95af6c67fa8352c0ca73 ./ytt-darwin-amd64
08d52157a8a7cea47215f05b5e16f318005430d15729f45697686715cb92b705 ./ytt-linux-amd64
e2f3ca145a0bca2b7277e31ece9c055ddb2e49959af65cfbbfd79da8b732e47a ./ytt-windows-amd64