From 8a4658f21d48852721fe01eaed65b4db5c1c45b0 Mon Sep 17 00:00:00 2001 From: Steven Wade Date: Fri, 11 Apr 2025 17:34:12 +0100 Subject: [PATCH 1/2] feat: add automatic Helm chart support detection Signed-off-by: Steven Wade --- kustdiff | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kustdiff b/kustdiff index c659440..04918e0 100755 --- a/kustdiff +++ b/kustdiff @@ -50,7 +50,15 @@ function build_ref { local safe_path=$(safe_filename "$relative_path") local output_file="$output_dir/${safe_path}.yaml" echo "Running kustomize for $envpath" - kustomize build "$envpath" -o "$output_file" + + # Check if kustomization.yaml contains helmCharts + local helm_flag="" + if grep -q "helmCharts:" "$envpath/kustomization.yaml"; then + debug_log "Helm charts detected in $envpath, enabling Helm support" + helm_flag="--enable-helm" + fi + + kustomize build $helm_flag "$envpath" -o "$output_file" if [ "$DEBUG" = "true" ]; then debug_log "Built kustomize for $envpath to $output_file" From 92ab78ee639d7c609ec758cc9256ef63f9b2a7e1 Mon Sep 17 00:00:00 2001 From: Steven Wade Date: Fri, 11 Apr 2025 17:45:31 +0100 Subject: [PATCH 2/2] fix: adding missing helm in image Signed-off-by: Steven Wade --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7efd731..3aeb97d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,10 @@ ARG KUSTOMIZE=5.6.0 RUN curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE}/kustomize_v${KUSTOMIZE}_linux_amd64.tar.gz | \ tar xz && mv kustomize /usr/local/bin/kustomize +ARG HELM_V3=3.17.1 +RUN curl -sSL https://get.helm.sh/helm-v${HELM_V3}-linux-amd64.tar.gz | \ +tar xz && mv linux-amd64/helm /usr/local/bin/helmv3 && rm -rf linux-amd64 && ln -s /usr/local/bin/helmv3 /usr/local/bin/helm && helm version + RUN rm -rf /var/cache/apk/* COPY kustdiff /kustdiff