From 75f16c291175373e8b950a5eb0f4725b1be740f6 Mon Sep 17 00:00:00 2001 From: codewdhruv Date: Fri, 30 Jun 2023 01:42:56 +0530 Subject: [PATCH] support for helm and kustomize --- Dockerfile | 16 ++++++++++++++-- entrypoint.sh | 6 ++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fc13cbd..f73f65f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,20 @@ RUN curl -LO "https://github.com/instrumenta/kubeval/releases/latest/download/ku rm kubeval-linux-amd64.tar.gz && \ mv kubeval /usr/local/bin/ +RUN apk add --no-cache ca-certificates + +RUN curl -LO "https://get.helm.sh/helm-v3.7.0-linux-amd64.tar.gz" && \ + tar xf helm-v3.7.0-linux-amd64.tar.gz && \ + rm helm-v3.7.0-linux-amd64.tar.gz && \ + mv linux-amd64/helm /usr/local/bin/ + +RUN apk add --no-cache git + +RUN curl -LO "https://github.com/kubernetes-sigs/kustomize/releases/latest/download/kustomize_linux_amd64" && \ + chmod +x kustomize_linux_amd64 && \ + mv kustomize_linux_amd64 /usr/local/bin/kustomize + COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] - +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index eaa1235..8715043 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -7,3 +7,9 @@ directory=$INPUT_DIRECTORY # Validate Kubernetes manifest files kubeval --strict $directory/*.yaml + +# Validate Helm charts +helm lint $directory/charts + +# Validate Kustomize overlays +kustomize build $directory/kustomize