talm init writes no .helmignore, so the whole project root is loaded as the chart

Đang mở
#254 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kubernetes
Lĩnh vực
cli, infrastructure

Hướng nghiên cứu

Start with the repro: run talm init --preset generic --name repro, copy the talm binary into the project, then run talm template --offline --file nodes/cp.yaml to see the 5 MiB chart-file error. Find where talm init and init --update write project files and add a .helmignore that keeps only Chart.yaml, values.yaml, templates/ and charts/. Done when the repro renders with the binary present and an existing project gets the file through init --update.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

A large file in the project directory breaks every render. The render loads the project root as a Helm chart and nothing filters it, so every file there becomes part of the chart, and one file over Helm's 5 MiB per-file limit stops it:

failed to render templates: loading chart from "/path/to/project": chart file "talm" is larger than the maximum file size 5242880

I hit it with the talm binary in the project directory. hack/install.sh installs into PATH, so that is not the default layout. A Talos image or a backup dropped next to the project does the same.

It also means secrets.yaml, talm.key and talosconfig are read into the chart's Files on every render. No template uses them, and the loader has no reason to read them.

Repro:

talm init --preset generic --name repro --cluster-endpoint https://192.0.2.10:6443
sed -i'' -e 's|^advertisedSubnets: .*|advertisedSubnets: [192.0.2.0/24]|' values.yaml
echo '# talm: nodes=["192.0.2.10"], endpoints=["192.0.2.10"], templates=["templates/controlplane.yaml"]' > nodes/cp.yaml
cp "$(command -v talm)" .
talm template --offline --file nodes/cp.yaml

Both problems go away if talm init and init --update write a .helmignore that keeps only Chart.yaml, values.yaml, templates/ and charts/. Existing projects would get it through init --update.

Ngôn ngữ chính
Go
Star
493
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cozystack/talm

Tất cả issue của cozystack/talm

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.