This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Small utility function based on yq to extract openAPIV3Schema from CRD | |
# example: crd2jsonschema.sh ./crd-alertmanager.yaml | |
set -e | |
function crd2jsonschema() { | |
set -e | |
local xkgroup="x-kubernetes-group-version-kind" | |
local document="$1" | |
local openAPIV3Schema=$(mktemp -u) |