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

Aperta
#254 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, kubernetes

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Go
Stelle
493
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cozystack/talm

Tutte le issue di cozystack/talm

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.