feat: add metallb crds #75

Merged
xoxys merged 3 commits from add-metallb into main 2024-03-26 12:13:28 +00:00
3 changed files with 30 additions and 2 deletions

View File

@ -7,7 +7,7 @@ when:
steps: steps:
- name: build - name: build
image: quay.io/thegeeklab/alpine-tools image: quay.io/thegeeklab/kube-tools
commands: commands:
- make - make

View File

@ -17,6 +17,8 @@ CNPG_VERSION := v1.22.2
MINIO_VERSION := v5.0.14 MINIO_VERSION := v5.0.14
# renovate: datasource=helm depName=k8up registryUrl=https://k8up-io.github.io/k8up # renovate: datasource=helm depName=k8up registryUrl=https://k8up-io.github.io/k8up
K8UP_VERSION := 4.5.0 K8UP_VERSION := 4.5.0
# renovate: datasource=github-releases depName=metallb/metallb
METALLB_VERSION := v0.14.2
.PHONY: all .PHONY: all
all: clean generate all: clean generate

View File

@ -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,7 +129,7 @@ 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"