In my current setup for creating an installable using gravity, I take
- app specific config values e.g. database credentials/external service urls and create the application configmaps and helm chart value files.
- create the gravity tar file with these config files in them
- Install the gravity tar on a bare metal machine without any other input.
The downside is that I have to know the config values before I create the tar file. I would like to move to a more conventional approach where I have a gravity tar file and someone can customize it later with environment variables for e.g.
What is the best practice for doing this?
My current idea is to create the tar without any config. Then on the nodes where the cluster has to be installed,
- untar the gravity file
- run a Python script to take the config values from the end user and create configmaps/helm chart values in a folder
CONFIG_FOLDER, export that as a environment variable
- run the gravity installation process where my
install.shfile (specified in the gravity
app.yamland hence will be run on installation) will pick them up from the
CONFIG_FOLDERenvironment variable and install them
Is there an idiomatic way of doing this in Gravity?