feat: add metallb crds (#75)
Reviewed-on: #75 Co-authored-by: Robert Kaussow <mail@thegeeklab.de> Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
This commit is contained in:
parent
bc1082032c
commit
592642167d
@ -7,7 +7,7 @@ when:
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: quay.io/thegeeklab/alpine-tools
|
||||
image: quay.io/thegeeklab/kube-tools
|
||||
commands:
|
||||
- make
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -17,6 +17,8 @@ CNPG_VERSION := v1.22.2
|
||||
MINIO_VERSION := v5.0.14
|
||||
# renovate: datasource=helm depName=k8up registryUrl=https://k8up-io.github.io/k8up
|
||||
K8UP_VERSION := 4.5.0
|
||||
# renovate: datasource=github-releases depName=metallb/metallb
|
||||
METALLB_VERSION := v0.14.2
|
||||
|
||||
.PHONY: all
|
||||
all: clean generate
|
||||
|
28
generate.sh
28
generate.sh
@ -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,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"
|
||||
default_openapi_handler
|
||||
|
||||
# K8up
|
||||
## K8up
|
||||
API=k8up.io
|
||||
NAME=k8up
|
||||
WORKDIR="${TMP_CRD_DIR}/$NAME"
|
||||
|
Loading…
Reference in New Issue
Block a user