-
Run this command to use a data value and schema file together. You can see if you change a value in the
values.yml
to be the incorrect type, you will see an error catches this.ytt -f /values.yml -f schema.yml -f template.yml
-
Generate the OpenAPI schema from the
schema.yml
file.ytt -f schema.yml --data-values-schema-inspect -o openapi-v3 > openapi-schema.yml
-
You can use this OpenAPI schema as documentation, or use it in a a kapp-controller Custom Resource, to document what inputs are allowed in the package.
ytt -f package-template.yml --data-value-file openapi=openapi-schema.yml > package.yml
This file contains 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 | |
# Error handling | |
function OwnError() | |
{ | |
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)" | |
exit $2 | |
} | |
# Repository for rethinkdb |