YAML templating tool

用于YAML结构而不是文本的YAML模板工具。「YAML templating tool that works on YAML structure instead of text」

Github星跟踪图

安装。从发布页面抓取预制的二进制文件。

玩。试试在线游乐场

有关注释、数据值、覆盖和其他功能的更多信息,请参见文档页面。

Slack。Kubernetes 中的 #carvel slack

概述

ytt(发音为拼写)是一个了解 YAML 结构的模板工具。它通过可重用的模板和用户提供的值,帮助你轻松配置复杂的软件。Ytt 包括以下功能。

  • 结构化模板:理解YAML结构,因此用户可以专注于他们的配置,而不是与文本模板相关的问题,如YAML值引用或手动模板缩进。
  • 内置编程语言:包括 "功能齐全 "的类似于Python的编程语言Starklark,通过更丰富的功能帮助减轻配置复杂软件的负担。
  • 可重复使用的配置。您可以通过应用环境特定的值,在不同环境中重复使用相同的配置。
  • 自定义验证:加上快速和确定性的执行,让您在创建和测试模板时,可以利用更快的反馈循环。
  • 覆盖:这种高级配置可以帮助用户管理复杂软件所需的定制。更多内容,请看在线游乐场的这个例子
  • 沙盒:为模板的执行提供一个安全的、确定性的环境。

试试吧

要开始使用 ytt 并查看示例,你可以使用在线游戏场或下载二进制文件并在本地运行游戏场。



主要指标

概览
名称与所有者carvel-dev/ytt
主编程语言Go
编程语言Go (语言数: 6)
平台Linux, Mac, Windows
许可证Apache License 2.0
所有者活动
创建于2019-03-01 00:13:56
推送于2025-06-06 12:13:08
最后一次提交
发布数109
最新版本名称v0.52.0 (发布于 )
第一版名称v0.1.0 (发布于 )
用户参与
星数1.8k
关注者数29
派生数141
提交数1.3k
已启用问题?
问题数534
打开的问题数151
拉请求数329
打开的拉请求数5
关闭的拉请求数56
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

ytt (YAML Templating Tool)

ytt (pronounced spelled out) is a templating tool that understands YAML structure allowing you to focus on your data instead of how to properly escape it.

Features:

  • templating works on YAML structure (instead of text)
    • which eliminates variety of problems such as invalid YAML formatting, escaping, etc.
  • syntactic sugar for single YAML node conditionals and for loops
    • makes it easier to read densely conditioned templates
  • templates are themselves valid YAML files
    • makes them friendly to existing editors and YAML tools
  • includes sandboxed "fully featured" Python-like programming language
  • allows configuration modularization via functions and libraries

Try it

Try out online playground or download latest binaries from Releases page and run it locally:

ytt -f examples/playground/example-demo/
ytt -f examples/playground/example-demo/ --output-directory tmp/

See examples/playground/ for examples shown on get-ytt.io.

Development

Consult docs/dev.md for build instructions, code structure details.