From 328e28bc7626b1c8346dfb7ed7e009a291468348 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 8 Mar 2023 13:39:56 +0100 Subject: [PATCH 1/2] chore: move schema handling to crds catalog --- Dockerfile | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9e251ee..e83acc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,6 @@ ARG YQ_VERSION ARG HELM_VERSION ARG KUSTOMIZE_VERSION ARG KUBECONFORM_VERSION -ARG CALICO_VERSION -ARG FLUXCD_VERSION # renovate: datasource=github-releases depName=kubernetes/kubernetes ENV KUBECTL_VERSION="${KUBECTL_VERSION:-v1.26.2}" @@ -24,15 +22,7 @@ ENV HELM_VERSION="${HELM_VERSION:-v3.11.1}" # renovate: datasource=github-releases depName=kubernetes-sigs/kustomize ENV KUSTOMIZE_VERSION="${KUSTOMIZE_VERSION:-v5.0.0}" # renovate: datasource=github-releases depName=yannh/kubeconform -ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.6.1}" -# renovate: datasource=github-releases depName=projectcalico/calico -ENV CALICO_VERSION="${CALICO_VERSION:-v3.25.0}" -# renovate: datasource=github-releases depName=fluxcd/flux2 -ENV FLUXCD_VERSION="${FLUXCD_VERSION:-v0.40.2}" -# renovate: datasource=github-releases depName=cert-manager/cert-manager -ENV CERTMANAGER_VERSION="${CERTMANAGER_VERSION:-v1.11.0}" -# renovate: datasource=github-releases depName=cloudnative-pg/cloudnative-pg -ENV CNPG_VERSION="${CNPG_VERSION:-v1.19.0}" +ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.5.0}" RUN apk --update add curl tar bash python3 py3-yaml && \ curl -SsfL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ @@ -44,30 +34,12 @@ RUN apk --update add curl tar bash python3 py3-yaml && \ | tar xz -C /usr/local/bin kustomize && \ curl -SsfL "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz" \ | tar xz -C /usr/local/bin kubeconform && \ - curl -SsfL -o /usr/local/bin/openapi2jsonschema "https://raw.githubusercontent.com/yannh/kubeconform/${KUBECONFORM_VERSION}/scripts/openapi2jsonschema.py" && \ chmod 755 /usr/local/bin/kubectl && \ chmod 755 /usr/local/bin/kubectl-convert && \ chmod 755 /usr/local/bin/yq && \ chmod 755 /usr/local/bin/helm && \ chmod 755 /usr/local/bin/kustomize && \ chmod 755 /usr/local/bin/kubeconform && \ - chmod 755 /usr/local/bin/openapi2jsonschema && \ - mkdir -p /etc/kube-tools/schemas/flux/master-standalone-strict && \ - mkdir -p /etc/kube-tools/schemas/calico/master-standalone-strict && \ - mkdir -p /etc/kube-tools/schemas/cert-manager/master-standalone-strict && \ - mkdir -p /etc/kube-tools/schemas/cloudnative-pg/master-standalone-strict && \ - curl -SsfL "https://github.com/fluxcd/flux2/releases/download/${FLUXCD_VERSION}/crd-schemas.tar.gz" \ - | tar xz -C /etc/kube-tools/schemas/flux/master-standalone-strict && \ - curl -SsfL -o /tmp/calico.crds.yaml "https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/calico.yaml" && \ - cd /etc/kube-tools/schemas/calico/master-standalone-strict && \ - openapi2jsonschema /tmp/calico.crds.yaml && \ - for file in *.json ; do mv $file ${file//_v1/_v3} ; done && \ - curl -SsfL -o /tmp/cert-manager.crds.yaml "https://github.com/cert-manager/cert-manager/releases/download/${CERTMANAGER_VERSION}/cert-manager.crds.yaml" && \ - cd /etc/kube-tools/schemas/cert-manager/master-standalone-strict && \ - openapi2jsonschema /tmp/cert-manager.crds.yaml && \ - curl -SsfL -o /tmp/cloudnative-pg.crds.yaml "https://github.com/cloudnative-pg/cloudnative-pg/releases/download/${CNPG_VERSION}/cnpg-${CNPG_VERSION##v}.yaml" && \ - cd /etc/kube-tools/schemas/cloudnative-pg/master-standalone-strict && \ - openapi2jsonschema /tmp/cloudnative-pg.crds.yaml && \ rm -rf /var/cache/apk/* && \ rm -rf /tmp/* -- 2.45.2 From a50d22c2b0e9663f987f290490d064d8da6bb3e8 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 8 Mar 2023 13:43:28 +0100 Subject: [PATCH 2/2] revert KUBECONFORM_VERSION --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e83acc7..1d0a36a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ ENV HELM_VERSION="${HELM_VERSION:-v3.11.1}" # renovate: datasource=github-releases depName=kubernetes-sigs/kustomize ENV KUSTOMIZE_VERSION="${KUSTOMIZE_VERSION:-v5.0.0}" # renovate: datasource=github-releases depName=yannh/kubeconform -ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.5.0}" +ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.6.1}" RUN apk --update add curl tar bash python3 py3-yaml && \ curl -SsfL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \ -- 2.45.2