Skip to content

Conversation

swade1987
Copy link
Owner

Description

This PR addresses an issue where the kustomize-diff action fails when processing kustomization files that include Helm charts.

Problem

When a kustomization.yaml file includes the helmCharts field, the action would fail with the following error:

`: must specify --enable-helm
This happens because Kustomize requires an explicit --enable-helm flag when building configurations that include Helm charts.

Solution

This PR adds automatic detection of Helm charts in kustomization files by:

  1. Checking for the presence of helmCharts: in each kustomization file
  2. Automatically adding the --enable-helm flag when needed
  3. Preserving the original behaviour for kustomization files that don't use Helm charts

Benefits

  1. Zero configuration: Users don't need to set any additional parameters
  2. Backwards compatible: No changes required for existing workflows
  3. Future proof: Works with mixed environments where only some kustomization files use Helm charts
  4. Transparent: Adds debug logging when Helm support is enabled

This change makes the action more robust and able to handle a wider variety of Kustomize configurations without user intervention.

How has this been tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s

Towards/Closes

Closes #12

feat: add automatic Helm chart support detection
fix: adding missing helm in image
@swade1987 swade1987 merged commit 804279c into main Apr 11, 2025
4 checks passed
@swade1987
Copy link
Owner Author

🎉 This PR is included in version 0.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support helm charts
1 participant