This commit is contained in:
parent
adc0a45089
commit
950b86895d
35
generate.sh
35
generate.sh
@ -82,6 +82,32 @@ for FILE in "${WORKDIR}"/*.json; do
|
|||||||
generate_all "$TARGET_DIR"
|
generate_all "$TARGET_DIR"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## Metallb
|
||||||
|
API=metallb.io
|
||||||
|
NAME=metallb
|
||||||
|
WORKDIR="${TMP_CRD_DIR}/$NAME"
|
||||||
|
SOURCE="https://raw.githubusercontent.com/metallb/metallb/${METALLB_VERSION}/charts/metallb/charts/crds/templates/crds.yaml"
|
||||||
|
|
||||||
|
printf "Processing %s ...\n" $API
|
||||||
|
mkdir -p "${WORKDIR}"
|
||||||
|
curl -SsfL -o "${WORKDIR}/${NAME}.crds.yaml" "${SOURCE}"
|
||||||
|
(
|
||||||
|
cd "$WORKDIR"
|
||||||
|
yq --inplace 'del(.spec.conversion)' "${NAME}.crds.yaml"
|
||||||
|
openapi2jsonschema "${NAME}.crds.yaml" >/dev/null
|
||||||
|
)
|
||||||
|
|
||||||
|
TARGET_DIR="$DIST/$API"
|
||||||
|
mkdir -p "$TARGET_DIR"
|
||||||
|
|
||||||
|
for FILE in "${WORKDIR}"/*.json; do
|
||||||
|
FILENAME=$(basename "$FILE")
|
||||||
|
|
||||||
|
mv "$FILE" "$TARGET_DIR/$FILENAME"
|
||||||
|
done
|
||||||
|
|
||||||
|
generate_all "$TARGET_DIR"
|
||||||
|
|
||||||
## Cloudnative-PG
|
## Cloudnative-PG
|
||||||
API=postgresql.cnpg.io
|
API=postgresql.cnpg.io
|
||||||
NAME=cnpg
|
NAME=cnpg
|
||||||
@ -103,16 +129,9 @@ WORKDIR="${TMP_CRD_DIR}/$NAME"
|
|||||||
SOURCE="https://raw.githubusercontent.com/minio/operator/${MINIO_VERSION}/resources/base/crds/minio.min.io_tenants.yaml"
|
SOURCE="https://raw.githubusercontent.com/minio/operator/${MINIO_VERSION}/resources/base/crds/minio.min.io_tenants.yaml"
|
||||||
default_openapi_handler
|
default_openapi_handler
|
||||||
|
|
||||||
# K8up
|
## K8up
|
||||||
API=k8up.io
|
API=k8up.io
|
||||||
NAME=k8up
|
NAME=k8up
|
||||||
WORKDIR="${TMP_CRD_DIR}/$NAME"
|
WORKDIR="${TMP_CRD_DIR}/$NAME"
|
||||||
SOURCE="https://github.com/k8up-io/k8up/releases/download/k8up-${K8UP_VERSION}/k8up-crd.yaml"
|
SOURCE="https://github.com/k8up-io/k8up/releases/download/k8up-${K8UP_VERSION}/k8up-crd.yaml"
|
||||||
default_openapi_handler
|
default_openapi_handler
|
||||||
|
|
||||||
# Metallb
|
|
||||||
API=metallb.io
|
|
||||||
NAME=metallb
|
|
||||||
WORKDIR="${TMP_CRD_DIR}/$NAME"
|
|
||||||
SOURCE="https://raw.githubusercontent.com/metallb/metallb/${METALLB_VERSION}/charts/metallb/charts/crds/templates/crds.yaml"
|
|
||||||
default_openapi_handler
|
|
||||||
|
Loading…
Reference in New Issue
Block a user