Fix if condition to test for var==true

Change the validation of the script execution to run only when
CERT_MANAGER_API == true as per default definition. 

dropping:  if RUN != "false"

Change-Id: I73aad3a3455fa3ebf9b360c40aa6ac003a44ac8a
changes/44/671744/4
Diogo Guerra 3 years ago committed by Diogo Guerra
parent 9c7cf5d6eb
commit dc8acda7f6
  1. 4
      magnum/drivers/common/templates/kubernetes/fragments/enable-cert-api-manager.sh

@ -5,10 +5,10 @@ printf "Starting to run ${step}\n"
. /etc/sysconfig/heat-params
if [ "$(echo $CERT_MANAGER_API | tr '[:upper:]' '[:lower:]')" != "false" ]; then
if [ "$(echo "${CERT_MANAGER_API}" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
cert_dir=/etc/kubernetes/certs
echo -e "$CA_KEY" > ${cert_dir}/ca.key
echo -e "${CA_KEY}" > ${cert_dir}/ca.key
chown kube.kube ${cert_dir}/ca.key
chmod 400 ${cert_dir}/ca.key

Loading…
Cancel
Save