Update to latest version

This commit is contained in:
Adrien Reslinger 2020-05-28 14:10:58 +02:00
parent f01d00e4f3
commit 7505260eb1
40 changed files with 58 additions and 59 deletions

View file

@ -1,15 +1,14 @@
#!/bin/bash
CERTMANAGER_VERSION=0.15.0
CERTMANAGER_VERSION=0.15.1
CERTMANAGER_SHORTVERSION="$(echo "${CERTMANAGER_VERSION}" | sed 's/^\(.*\)\.[0-9]$/\1/')"
cd "$(dirname ${0})"/../templates/
wget https://github.com/jetstack/cert-manager/releases/download/v"${CERTMANAGER_VERSION}"/cert-manager.yaml
kubernetes-split-yaml cert-manager.yaml > generated.log
if [ -d "${CERTMANAGER_SHORTVERSION}" ]; then
rm -fr "${CERTMANAGER_SHORTVERSION}"
if [ -d templates/"${CERTMANAGER_SHORTVERSION}" ]; then
rm -fr templates/"${CERTMANAGER_SHORTVERSION}"
fi
mv generated "${CERTMANAGER_SHORTVERSION}"
mv generated templates/"${CERTMANAGER_SHORTVERSION}"
cat generated.log | while read LIGNE; do if [ $(echo "${LIGNE}" | grep -c ^File) -eq 1 ]; then echo -n "${LIGNE} "; else echo "${LIGNE}"; fi; done | grep ^File | sort -V | sed 's|.*\(generated/\)\(.*\.yaml\)| - "'${CERTMANAGER_SHORTVERSION}'/\2"|'
sed '/args:/ a\ - --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53' -i "${CERTMANAGER_SHORTVERSION}"/cert-manager-Deployment.yaml
sed '/args:/ a\ - --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53' -i templates/"${CERTMANAGER_SHORTVERSION}"/cert-manager-Deployment.yaml
rm -f generated.log cert-manager.yaml