-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch-schemas-api-platform.sh
executable file
·34 lines (24 loc) · 1.12 KB
/
fetch-schemas-api-platform.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
if [ -z "$1" ] ; then
echo cluster folder as first argument required
echo example ./fetch-schemas.sh api-platform
exit 1
fi
SCHEMA_FETCH_SCRIPT=${PWD}/openapi2jsonschema.py
WORKDIR=${1}
export FILENAME_FORMAT='{kind}-{group}-{version}'
ISTIO_VERSION=1.11.6
ISTIO_URL=https://raw.githubusercontent.com/istio/istio/${ISTIO_VERSION}/manifests/charts/base/crds/crd-all.gen.yaml
EXTERNAL_SECRET_MANAGER_VERSION=v0.9.11
EXTERNAL_SECRET_MANAGER_URL=https://raw.githubusercontent.com/external-secrets/external-secrets/${EXTERNAL_SECRET_MANAGER_VERSION}/config/crds/bases/external-secrets.io_externalsecrets.yaml
OLD_EXTERNAL_SECRET_VERSION=8.5.5
OLD_EXTERNAL_SECRET_MANAGER_URL=https://raw.githubusercontent.com/external-secrets/kubernetes-external-secrets/${OLD_EXTERNAL_SECRET_VERSION}/charts/kubernetes-external-secrets/crds/kubernetes-client.io_externalsecrets_crd.yaml
echo $OLD_EXTERNAL_SECRET_MANAGER_URL
### SETUP
mkdir -p ${WORKDIR}
rm -fr ${WORKDIR}/*
pushd ${WORKDIR}
$SCHEMA_FETCH_SCRIPT $ISTIO_URL
$SCHEMA_FETCH_SCRIPT $EXTERNAL_SECRET_MANAGER_URL
$SCHEMA_FETCH_SCRIPT $OLD_EXTERNAL_SECRET_MANAGER_URL
popd