From ec6ee3f7f42581e7b8fdc16ccbe530f606f98ff0 Mon Sep 17 00:00:00 2001 From: Adrien Reslinger Date: Wed, 16 Jun 2021 14:14:40 +0200 Subject: [PATCH] Update script --- bin/gen_list.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/bin/gen_list.sh b/bin/gen_list.sh index 62d36dd..dfa8260 100755 --- a/bin/gen_list.sh +++ b/bin/gen_list.sh @@ -1,18 +1,18 @@ #!/bin/bash -CERTMANAGER_VERSION="$(curl --silent "https://api.github.com/repos/jetstack/cert-manager/releases/latest" | jq {"name"} | sed -e '/^{/d' -e '/^}/d' -e 's|.*v\([0-9\.]*\).*|\1|')" -CERTMANAGER_SHORTVERSION="$(echo "${CERTMANAGER_VERSION}" | sed 's/^\(.*\)\.[0-9]$/\1/')" -#helm repo add jetstack https://charts.jetstack.io -#helm repo update -helm template cert-manager jetstack/cert-manager --namespace cert-manager --version "v${CERTMANAGER_VERSION}" --set installCRDs=true,global.podSecurityPolicy.enabled=true --set 'extraArgs={--dns01-recursive-nameservers=8.8.8.8:53\,1.1.1.1:53}' > cert-manager.yaml -#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 templates/"${CERTMANAGER_SHORTVERSION}" ]; then - rm -fr templates/"${CERTMANAGER_SHORTVERSION}" -fi -mv generated templates/"${CERTMANAGER_SHORTVERSION}" -echo -e "---\ncertmanager_${CERTMANAGER_SHORTVERSION}_list:" > vars/files_list_${CERTMANAGER_SHORTVERSION}.yml -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"|' >> vars/files_list_${CERTMANAGER_SHORTVERSION}.yml - -#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 +#CERTMANAGER_VERSION="$(curl --silent "https://api.github.com/repos/jetstack/cert-manager/releases/latest" | jq {"name"} | sed -e '/^{/d' -e '/^}/d' -e 's|.*v\([0-9\.]*\).*|\1|')" +#CERTMANAGER_SHORTVERSION="$(echo "${CERTMANAGER_VERSION}" | sed 's/^\(.*\)\.[0-9]$/\1/')" +##helm repo add jetstack https://charts.jetstack.io +##helm repo update +#helm template cert-manager jetstack/cert-manager --namespace cert-manager --version "v${CERTMANAGER_VERSION}" --set installCRDs=true,global.podSecurityPolicy.enabled=true --set 'extraArgs={--dns01-recursive-nameservers=8.8.8.8:53\,1.1.1.1:53}' > cert-manager.yaml +##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 templates/"${CERTMANAGER_SHORTVERSION}" ]; then +# rm -fr templates/"${CERTMANAGER_SHORTVERSION}" +#fi +#mv generated templates/"${CERTMANAGER_SHORTVERSION}" +#echo -e "---\ncertmanager_${CERTMANAGER_SHORTVERSION}_list:" > vars/files_list_${CERTMANAGER_SHORTVERSION}.yml +#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"|' >> vars/files_list_${CERTMANAGER_SHORTVERSION}.yml +# +##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