File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ ARG KUSTOMIZE=5.6.0
8
8
RUN curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE}/kustomize_v${KUSTOMIZE}_linux_amd64.tar.gz | \
9
9
tar xz && mv kustomize /usr/local/bin/kustomize
10
10
11
+ ARG HELM_V3=3.17.1
12
+ RUN curl -sSL https://get.helm.sh/helm-v${HELM_V3}-linux-amd64.tar.gz | \
13
+ 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
14
+
11
15
RUN rm -rf /var/cache/apk/*
12
16
13
17
COPY kustdiff /kustdiff
Original file line number Diff line number Diff line change @@ -50,7 +50,15 @@ function build_ref {
50
50
local safe_path=$( safe_filename " $relative_path " )
51
51
local output_file=" $output_dir /${safe_path} .yaml"
52
52
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 "
54
62
55
63
if [ " $DEBUG " = " true" ]; then
56
64
debug_log " Built kustomize for $envpath to $output_file "
You can’t perform that action at this time.
0 commit comments