Skip to content

Commit

Permalink
move secrets yaml file name to one static value
Browse files Browse the repository at this point in the history
  • Loading branch information
szibis committed Jul 10, 2017
1 parent adffbb3 commit 5a479ee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ esac
}

vars_load() {
export SEC_FILE="secrets.yaml"
export templates_dir="$(dirname ${chart})"
if [[ -f "${templates_dir}/templates/secrets.yaml" ]]; then
export yml="${templates_dir}/templates/secrets.yaml"
if [[ -f "${templates_dir}/templates/${SEC_FILE}" ]]; then
export yml="${templates_dir}/templates/${SEC_FILE}"
elif [[ -f "${templates_dir}/secrets.yml" ]]; then
echo "WARNING for ${chart}: secrets.yml should be renamed to secrets.yaml"
export yml="${templates_dir}/secrets.yml"
elif [[ -f "${templates_dir}/secrets.yaml" ]]; then
export yml="${templates_dir}/secrets.yaml"
elif [[ -f "${templates_dir}/${SEC_FILE}" ]]; then
export yml="${templates_dir}/${SEC_FILE}"
# load defined file in dir
elif [[ -f "${templates_dir}" ]]; then
export yml="${templates_dir}"
#elif [[ -d "${templates_dir}" ]]; then
# export yml="${templates_dir}/${SEC_FILE}"
fi
}

Expand Down

0 comments on commit 5a479ee

Please sign in to comment.