Giới thiệu
ytt là một công cụ mã nguồn mở được phát triển bởi Carvel, chuyên dùng để tạo mẫu (templating) cho các tệp YAML. Khác với các công cụ xử lý YAML thông thường dựa trên thao tác văn bản, ytt hoạt động trực tiếp trên cấu trúc dữ liệu YAML, giúp tăng độ chính xác và linh hoạt khi quản lý cấu hình.
Phần mềm này rất hữu ích trong các môi trường DevOps, đặc biệt là khi làm việc với Kubernetes (k8s), nơi mà việc quản lý các file YAML cấu hình phức tạp là điều thường xuyên. ytt giúp tự động hóa và chuẩn hóa quá trình tạo và chỉnh sửa YAML, giảm thiểu lỗi do thao tác thủ công.
Tính năng chính
- Xử lý và tạo mẫu YAML dựa trên cấu trúc dữ liệu thay vì văn bản thuần túy.
- Hỗ trợ các thao tác templating phức tạp phù hợp với môi trường DevOps và Kubernetes.
- Được phát triển bằng ngôn ngữ Go, đảm bảo hiệu năng và tính ổn định cao.
- Cung cấp các tính năng cấu hình linh hoạt cho các tệp YAML.
- Phần mềm chạy dưới dạng công cụ dòng lệnh CLI, thuận tiện cho việc tích hợp vào các quy trình tự động hóa.
Ai nên dùng
ytt phù hợp với các kỹ sư DevOps, quản trị hệ thống, lập trình viên làm việc với Kubernetes hoặc các dự án sử dụng YAML để quản lý cấu hình. Những người cần một công cụ templating mạnh mẽ, dễ dàng tích hợp vào quy trình CI/CD sẽ thấy ytt rất hữu ích.
Cài đặt
- Bấm nút Tải về trên trang này để tải bộ cài gốc.
- Giải nén file tải về vì đây là bản portable, không cần cài đặt.
- Mở terminal (dòng lệnh) và chạy file ytt để sử dụng công cụ.
Lưu ý
ytt là phần mềm mã nguồn mở, miễn phí theo giấy phép Apache-2.0. Đây là công cụ dòng lệnh dành cho người dùng có kiến thức cơ bản về terminal và YAML. Để sử dụng lâu dài và đầy đủ tính năng, bạn nên tuân thủ các điều khoản của giấy phép.
Có gì mới trong 0.55.3
Installation and signature verification
Installation
By downloading binary from the release
For instance, if you are using Linux on an AMD64 architecture:
# Download the binary
curl -LO https://github.com/carvel-dev/ytt/releases/download/v0.55.3/ytt-linux-amd64
# Move the binary in to your PATH
mv kapp-linux-amd64 /usr/local/bin/ytt
# Make the binary executable
chmod +x /usr/local/bin/ytt
Via Homebrew (macOS or Linux)
$ brew tap carvel-dev/carvel
$ brew install ytt
$ ytt version
Verify checksums file signature
The checksums file provided within the artifacts attached to this release is signed using Cosign with GitHub OIDC(Refer this page for cosign installation). To validate the signature of this file, run the following commands:
# Download the checksums file, certificate and signature
curl -LO https://github.com/carvel-dev/ytt/releases/download/v0.55.3/checksums.txt
curl -LO https://github.com/carvel-dev/ytt/releases/download/v0.55.3/checksums.txt.pem
curl -LO https://github.com/carvel-dev/ytt/releases/download/v0.55.3/checksums.txt.sig
# Verify the checksums file
cosign verify-blob checksums.txt \
--certificate checksums.txt.pem \
--signature checksums.txt.sig \
--certificate-identity-regexp=https://github.com/carvel-dev \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
Verify binary integrity
To verify the integrity of the downloaded binary, you can utilize the checksums file after having validated its signature.
# Verify the binary using the checksums file
sha256sum -c checksums.txt --ignore-missing
What's Changed
- Deprecate @ytt:md5 module in favor of @ytt:sha256 by @G-Gobi in #997
- Include filenames in Starlark errors by @snowyukitty in #998
- Skip leading UTF-8 BOMs in YAML, Starlark, and text templates by @vsolano9 in #1000
- Fix: correct grammar and formatting in error messages by @sameerforge in #1011
New Contributors
- @snowyukitty made their first contribution in #998
- @vsolano9 made their first contribution in #1000
Full Changelog: v0.55.2...v0.55.3
d05c3cc00b9e48b8f5ffe15d25b2dd0378d13d9678f273be8df6c5ba69a6bc5a ./ytt-windows-arm64.exe
2f76da0fb766c78b2bbd046ca89d9b71a2dbc01f81e51a0f95e88e7a26f08a5c ./ytt-windows-amd64.exe
01c231d89091cf809060bd78ffacd1fc90bbe76612f8c880ac6850b2c282b535 ./ytt-linux-riscv64
fed073d52b780a88ce506e68c44f33cedede2dad3d5f4fbe07a2833e45d996ed ./ytt-linux-arm64
15751b45a819edbf22b3d3eadb5fa9a5a2599128d921660a874bd39c47bb41e1 ./ytt-linux-amd64
427bffa2b10e7f1bb5cbbe0dc9675fca56ad60f139683d0c6a5428524a4c47a1 ./ytt-darwin-arm64
b46df4cde88f0104b4c634c52a184e477e897a0ae76b057e6f3e225218998c80 ./ytt-darwin-amd64