X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=deploy%2Fcert-manager%2Fcert-manager.sh;h=8983ce2601cab4c113906efa05ea78dd658b3cbe;hb=refs%2Fchanges%2F04%2F4704%2F1;hp=47afeb75f3e259aecfcf9ac09eb6aee778e9f617;hpb=6687e9da29833b50b40ae9075b455fd73bf50666;p=icn.git diff --git a/deploy/cert-manager/cert-manager.sh b/deploy/cert-manager/cert-manager.sh index 47afeb7..8983ce2 100755 --- a/deploy/cert-manager/cert-manager.sh +++ b/deploy/cert-manager/cert-manager.sh @@ -7,12 +7,11 @@ LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib" source $LIBDIR/logging.sh source $LIBDIR/common.sh -# Cert-Manager version to use -CERT_MANAGER_VERSION="v1.5.3" - trap err_exit ERR function err_exit { - kubectl get all -n cert-manager + if command -v kubectl; then + kubectl get all -n cert-manager + fi } # This may be used to update the in-place cert-manager YAML @@ -20,6 +19,7 @@ function err_exit { function build_source { mkdir -p ${SCRIPTDIR}/base curl -sL https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml -o ${SCRIPTDIR}/base/cert-manager.yaml + rm -f ${SCRIPTDIR}/base/kustomization.yaml pushd ${SCRIPTDIR}/base && kustomize create --autodetect && popd } @@ -29,7 +29,7 @@ function deploy { } function clean { - kustomize build ${SCRIPTDIR}/icn | kubectl delete -f - + kustomize build ${SCRIPTDIR}/icn | kubectl delete --ignore-not-found=true -f - } case $1 in