Skip to content

Commit

Permalink
handle the posibility that CCO will have no static pod definition
Browse files Browse the repository at this point in the history
When disabling CCO, the bootstrap-manifests dir will be empty which will error bootkube.sh.

Skip tyring to copy an empty directory by detecting whether the static pod manifest was rendered (the directory should always exist starting with openshift/cloud-credential-operator#175 ).
  • Loading branch information
Joel Diaz committed Apr 13, 2020
1 parent c7d9d4f commit 7e2b0ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Expand Up @@ -351,7 +351,10 @@ then
--cloud-credential-operator-image=${CLOUD_CREDENTIAL_OPERATOR_IMAGE}

cp cco-bootstrap/manifests/* manifests/
cp cco-bootstrap/bootstrap-manifests/* bootstrap-manifests/
# skip copy if static pod manifest does not exist (ie CCO has been disabled)
if [ -f cco-bootstrap/bootstrap-manifests/cloud-credential-operator-pod.yaml ]; then
cp cco-bootstrap/bootstrap-manifests/* bootstrap-manifests/
fi

touch cco-bootstrap.done
fi
Expand Down

0 comments on commit 7e2b0ad

Please sign in to comment.