feat: add metallb crds #75

Merged
xoxys merged 3 commits from add-metallb into main 2024-03-26 12:13:28 +00:00
Showing only changes of commit 950b86895d - Show all commits

View File

@ -82,6 +82,32 @@ for FILE in "${WORKDIR}"/*.json; do
generate_all "$TARGET_DIR"
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
API=postgresql.cnpg.io
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"
default_openapi_handler
# K8up
## K8up
API=k8up.io
NAME=k8up
WORKDIR="${TMP_CRD_DIR}/$NAME"
SOURCE="https://github.com/k8up-io/k8up/releases/download/k8up-${K8UP_VERSION}/k8up-crd.yaml"
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