save_values_shell_script

usage

use one helm chart to deploy all same projects with different values

this script will save all values from helm chart to use it another time to upgrade deployed helm chart.

prerequisite

mentain your values.yaml file as shown in values.yaml in this project.
you have to set the siteName attribute it will help to identify when we will extract it from all the values saved in one file.

Note:

this script succesfully works on line numbers you can also get example file in this project where whole file content is mentained in 1 to 101 lines(which is highly required to run this script as expected). 

copy this script where your helm chart is localted.

how to use this scripts.

$ git clone https://github.com/harshdevl/save_values_shell_script.git

$ sudo cp -rp save_values_shell_script/* path/of/your/helmchart

$ cd save_values_shell_script

$ sudo chmod 777 save_your_yaml_values.sh

$ sudo chmod 777 get_your_yaml_back.sh

give helm chart name in save_your_yaml_values.sh script

$ ./save_your_yaml_values.sh

after this all the vallues from values.yaml will be stored in allvalues.yaml.

to get back you values from allvalues.yaml.

$ ./get_your_yaml_back.sh siteName