Last active
April 3, 2020 16:08
-
-
Save developer-guy/6f1187a0b5431565a4ec4ebdca0bde14 to your computer and use it in GitHub Desktop.
kubeval jsonschemas installation
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
#!/usr/bin/bash | |
# Don't forget to change your schemas location. | |
declare -a supported_versions | |
supported_versions=(v1.17.0 v1.16.0 v1.15.0) | |
EXTRACT_COMMAND="mkdir -p ~/.kubeval/schemas && \ | |
curl https://codeload.github.com/instrumenta/kubernetes-json-schema/tar.gz/master | \ | |
tar -C ~/.kubeval/schemas --strip-components=1 -xzvf - " | |
for sv in "${supported_versions[@]}" | |
do | |
echo "Supported version: $sv" | |
EXTRACT_COMMAND+=" kubernetes-json-schema-master/$sv-standalone kubernetes-json-schema-master/$sv kubernetes-json-schema-master/$sv-standalone-strict" | |
done | |
eval $EXTRACT_COMMAND | |
export KUBEVAL_SCHEMA_LOCATION=file:///Users/batuhan.apaydin/.kubeval/schemas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment