community icon indicating copy to clipboard operation
community copied to clipboard

Bring .helmignore to parity with .gitignore for Charts v3

Open scottrigby opened this issue 3 weeks ago • 0 comments

Summary

This HIP proposes bringing .helmignore file targeting semantics to full parity with .gitignore syntax and matching rules for Helm Charts v3.

Problem

Users expect .helmignore to work like .gitignore, but the current implementation has critical divergences:

  • Broken negation: Whitelist patterns like /* + !Chart.yaml fail because negation logic is inverted (helm#3622, helm#8688)
  • No ** globs: Recursive patterns are explicitly unsupported
  • First-match semantics: Helm stops at first match; Git uses last-match-wins

These issues have persisted for years (PR helm/helm#12265 stalled since 2023) because fixing them is a breaking change.

Solution

Scope the fix to Charts v3 (per HIP-0020), providing:

  • Full .gitignore pattern syntax (**, !, escape sequences)
  • Last-match-wins rule evaluation
  • Clean opt-in boundary—v2 charts unchanged, v3 charts get correct behavior

References

  • Depends on: HIP-0020 (Charts v3 Enablement)
  • Implementation approach: Use go-git's gitignore (same as FluxCD's .sourceignore)

scottrigby avatar Dec 14 '25 22:12 scottrigby