mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-12 17:27:14 +02:00
Co-Authored-By: Yann Hamon <yann.hamon@contentful.com> Co-Authored-By: Kemal Akkoyun <kakkoyun@gmail.com> Signed-off-by: paulfantom <pawel@krupa.net.pl>
14 lines
301 B
Bash
Executable File
14 lines
301 B
Bash
Executable File
#!/bin/bash
|
|
|
|
DIR="crdschemas"
|
|
|
|
# Go to git repository root
|
|
cd ./$(git rev-parse --show-cdup)
|
|
|
|
rm -rf "$DIR"
|
|
mkdir "$DIR"
|
|
|
|
for crd in vendor/prometheus-operator/*-crd.libsonnet; do
|
|
jq '.spec.versions[0].schema.openAPIV3Schema' < "$crd" > "$DIR/$(basename "$crd" | sed 's/-crd.libsonnet/.json/')"
|
|
done
|