Skip to content

Commit 7ba4c7c

Browse files
authored
Merge pull request #18 from swade1987/helm-support
feat: add automatic Helm chart support detection
2 parents 8af0d46 + 8a4658f commit 7ba4c7c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

kustdiff

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ function build_ref {
5050
local safe_path=$(safe_filename "$relative_path")
5151
local output_file="$output_dir/${safe_path}.yaml"
5252
echo "Running kustomize for $envpath"
53-
kustomize build "$envpath" -o "$output_file"
53+
54+
# Check if kustomization.yaml contains helmCharts
55+
local helm_flag=""
56+
if grep -q "helmCharts:" "$envpath/kustomization.yaml"; then
57+
debug_log "Helm charts detected in $envpath, enabling Helm support"
58+
helm_flag="--enable-helm"
59+
fi
60+
61+
kustomize build $helm_flag "$envpath" -o "$output_file"
5462

5563
if [ "$DEBUG" = "true" ]; then
5664
debug_log "Built kustomize for $envpath to $output_file"

0 commit comments

Comments
 (0)