feat: add cloudnative-pg crds
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2023-02-24 23:56:07 +01:00
parent f656f7bcdd
commit 468d9fb539
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,8 @@ ENV CALICO_VERSION="${CALICO_VERSION:-v3.25.0}"
ENV FLUXCD_VERSION="${FLUXCD_VERSION:-v0.40.1}" ENV FLUXCD_VERSION="${FLUXCD_VERSION:-v0.40.1}"
# renovate: datasource=github-releases depName=cert-manager/cert-manager # renovate: datasource=github-releases depName=cert-manager/cert-manager
ENV CERTMANAGER_VERSION="${CERTMANAGER_VERSION:-v1.11.0}" 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}"
RUN apk --update add curl tar bash python3 py3-yaml && \ 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" && \ curl -SsfL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
@ -53,6 +55,7 @@ RUN apk --update add curl tar bash python3 py3-yaml && \
mkdir -p /etc/kube-tools/schemas/flux/master-standalone-strict && \ 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/calico/master-standalone-strict && \
mkdir -p /etc/kube-tools/schemas/cert-manager/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" \ 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 && \ | 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" && \ curl -SsfL -o /tmp/calico.crds.yaml "https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/calico.yaml" && \
@ -62,6 +65,9 @@ RUN apk --update add curl tar bash python3 py3-yaml && \
curl -SsfL -o /tmp/cert-manager.crds.yaml "https://github.com/cert-manager/cert-manager/releases/download/${CERTMANAGER_VERSION}/cert-manager.crds.yaml" && \ 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 && \ cd /etc/kube-tools/schemas/cert-manager/master-standalone-strict && \
openapi2jsonschema /tmp/cert-manager.crds.yaml && \ 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 /var/cache/apk/* && \
rm -rf /tmp/* rm -rf /tmp/*

View File

@ -41,6 +41,7 @@ kubeconform_config=(
"-schema-location" "/etc/kube-tools/schemas/flux" "-schema-location" "/etc/kube-tools/schemas/flux"
"-schema-location" "/etc/kube-tools/schemas/calico/master-standalone-strict/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json" "-schema-location" "/etc/kube-tools/schemas/calico/master-standalone-strict/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json"
"-schema-location" "/etc/kube-tools/schemas/cert-manager/master-standalone-strict/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json" "-schema-location" "/etc/kube-tools/schemas/cert-manager/master-standalone-strict/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json"
"-schema-location" "/etc/kube-tools/schemas/cloudnative-pg/master-standalone-strict/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json"
"-exit-on-error" "-exit-on-error"
"-summary" "-summary"
"-skip" "Secret,CustomResourceDefinition" "-skip" "Secret,CustomResourceDefinition"