fluxcd / source-controller

The GitOps Toolkit source management component
https://fluxcd.io
Apache License 2.0
239 stars 186 forks source link

"failed to load Helm repository" results in data storage leak #1462

Closed guyguy333 closed 5 months ago

guyguy333 commented 5 months ago

Hi,

/tmp directory size is increasing a lot. After investigations, it contains only chart-index-xxxxx.yaml files, and more precisely, only charts from "truecharts" repository. However, index is too long as I can find errors in logs:

{"level":"error","ts":"2024-04-24T09:29:02.174Z","msg":"Reconciler error","controller":"helmrepository","controllerGroup":"source.toolkit.fluxcd.io","controllerKind":"HelmRepository","HelmRepository":{"name":"truecharts","namespace":"flux-system"},"namespace":"flux-system","name":"truecharts","reconcileID":"a30ab495-d3e5-4b5f-86ed-e3dff7b8b931","error":"failed to load Helm repository from index YAML: failed to load index: /tmp/chart-index-861161562.yaml exceeds the maximum index file size of 52428800 bytes"}

I'm not sure but I think this error doesn't handle properly clean. In others words, index file remains (~63M), which results in data storage leak contrary to others repositories not having this file in /tmp.

stefanprodan commented 5 months ago

Duplicate: #1451