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

Abierto
#254 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go, kubernetes

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
493
Forks
23
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cozystack/talm

Todos los issues de cozystack/talm

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.