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"
15 kubectl get all -n cert-manager
18 # This may be used to update the in-place cert-manager YAML
19 # files from the upstream project
20 function build_source {
21 mkdir -p ${SCRIPTDIR}/base
22 curl -sL https://github.com/jetstack/cert-manager/releases/download/${CERT_MANAGER_VERSION}/cert-manager.yaml -o ${SCRIPTDIR}/base/cert-manager.yaml
23 pushd ${SCRIPTDIR}/base && kustomize create --autodetect && popd
27 kustomize build ${SCRIPTDIR}/icn | kubectl apply -f -
28 kubectl -n cert-manager wait --for=condition=Available --timeout=300s deployment --all
32 kustomize build ${SCRIPTDIR}/icn | kubectl delete -f -
36 "build-source") build_source ;;
40 Usage: $(basename $0) COMMAND
43 build-source - Rebuild the in-tree cert-manager YAML files
44 clean - Remove the cert-manager
45 deploy - Deploy the cert-manager