Skip to content

Instantly share code, notes, and snippets.

View thatsk's full-sized avatar

Kunalsing Thakur thatsk

View GitHub Profile
#!/bin/bash
# Error handling
function OwnError()
{
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)"
exit $2
}
# Repository for rethinkdb
@cari-lynn
cari-lynn / commands.md
Last active January 10, 2022 05:20
Workflow to generate an OpenAPI Doc from a data values schema
  1. 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

  2. Generate the OpenAPI schema from the schema.yml file. ytt -f schema.yml --data-values-schema-inspect -o openapi-v3 > openapi-schema.yml

  3. 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