From dbe4d4c17e24e2a1638edd97e0d970b733773def Mon Sep 17 00:00:00 2001 From: hajowieland Date: Tue, 4 Jul 2023 13:47:06 +0200 Subject: [PATCH 1/4] chore: ignore DL3003 linting rule which is required for kubernetes-json-schema --- .github/workflows/lint.yml | 1 + .pre-commit-config.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4ff96b3..1705a68 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,3 +14,4 @@ jobs: uses: hadolint/hadolint-action@master with: dockerfile: "Dockerfile" + ignore: "DL3003" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b878fc3..9b761f3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,3 +3,5 @@ repos: rev: v2.12.0 hooks: - id: hadolint + args: + - --ignore DL3003 From 926e835645c2408cc7e8c497941a7efcd962eef6 Mon Sep 17 00:00:00 2001 From: hajowieland Date: Tue, 4 Jul 2023 13:49:01 +0200 Subject: [PATCH 2/4] chore: ignore DL3003 linting rule which is required for kubernetes-json-schema --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b761f3..f02c095 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,4 +4,4 @@ repos: hooks: - id: hadolint args: - - --ignore DL3003 + - "--ignore DL3003" From 51ec24878cb3fc8be88d47f0e81a5ce21bbb4132 Mon Sep 17 00:00:00 2001 From: hajowieland Date: Tue, 4 Jul 2023 13:49:52 +0200 Subject: [PATCH 3/4] chore: ignore DL3003 linting rule which is required for kubernetes-json-schema --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f02c095..593ef42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,4 +4,5 @@ repos: hooks: - id: hadolint args: - - "--ignore DL3003" + - --ignore + - DL3003 From d2a26ba1fa5c9ef8dd0f8fbfbafa52dc8b547484 Mon Sep 17 00:00:00 2001 From: hajowieland Date: Tue, 4 Jul 2023 13:49:56 +0200 Subject: [PATCH 4/4] feat: add kubernetes-schema JSON files locally for air-gapped environments, based on KUBECTL version --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 00dac72..063d1c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -95,6 +95,11 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$ curl -sLS "https://github.com/yannh/kubeconform/releases/download/v${KUBECONFORM}/kubeconform-linux-${ARCHITECTURE}.tar.gz" | tar -xzO kubeconform > /usr/local/bin/kubeconform && \ chmod +x /usr/local/bin/kubeconform +# kubernetes-json-schema +RUN git clone --depth 1 --branch master --no-checkout https://github.com/yannh/kubernetes-json-schema.git && \ + cd kubernetes-json-schema && git sparse-checkout set v${KUBECTL}-standalone-strict && git checkout master && \ + mkdir -p /schema && cp -r v${KUBECTL}-standalone-strict /schema/ && cd .. && rm -rf kubernetes-json-schema + WORKDIR /work CMD ["helm", "version"]