ForgeRock / forgeops

ForgeRock platform assets for Kubernetes deployment. Contains the files you need to build your own Docker images and to deploy the ForgeRock Identity Platform on Kubernetes clusters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Few minor issues in bin/bootstrap.sh

rk295 opened this issue · comments

Hi,

I've noticed a few minor issues in bin/bootstrap.sh, as follows:

  • It isn't running in the unofficial bash strict mode, which makes catching errors easier.
  • The two simple functions at the beginning msg and err both use \e, the \ is literal in this case and its nicer to escape them. See here
  • line 25, the NAMESPACE environment variable is assumed to be set, no checks are made if it is not.
  • line 25, if the namespace specified in $NAMESPACE does not exist, this errors.
  • line 32, the quotes around ${secretName} actually unquote the variable, maybe escape them if you want them in the output, or remove if you do not.
  • line 49, the REPO environment variable is unused in the script, was it meant to be exported or can it be removed?
  • line 50, this doesn't inject the secret into the namespace specified in $NAMESPACE.
  • The helper output on lines 73, 74 and 75 do not prefix the chart name with the repo name, so the helm install commands fail.
  • The output from various commands clutters the script output and makes it harder for the user to see what was actually done.