4 SCRIPTDIR="$(readlink -f $(dirname ${BASH_SOURCE[0]}))"
5 LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib"
7 source $LIBDIR/logging.sh
8 source $LIBDIR/common.sh
10 # Cert-Manager version to use
11 CERT_MANAGER_VERSION="v1.5.3"
13 # This may be used to update the in-place cert-manager YAML
14 # files from the upstream project
15 function build_source {
16 mkdir -p ${SCRIPTDIR}/base
17 curl -sL https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml -o ${SCRIPTDIR}/base/cert-manager.yaml
18 pushd ${SCRIPTDIR}/base && kustomize create --autodetect && popd
22 kustomize build ${SCRIPTDIR}/icn | kubectl apply -f -
23 kubectl -n cert-manager wait --for=condition=Available --timeout=300s deployment --all
27 kustomize build ${SCRIPTDIR}/icn | kubectl delete -f -
31 "build-source") build_source ;;
35 Usage: $(basename $0) COMMAND
38 build-source - Rebuild the in-tree cert-manager YAML files
39 clean - Remove the cert-manager
40 deploy - Deploy the cert-manager