File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -196,12 +196,12 @@ function cleanupCertificates() {
196196 # check if it is a lets encrypt certificate
197197 if openssl x509 -in <( kubectl -n ${NAMESPACE} get secret ${TLS_SECRET} -o json | jq -r ' .data."tls.crt" | @base64d' ) -text -noout | grep -o -q " Let's Encrypt" & > /dev/null; then
198198 # don't block execution
199- kubectl -n ${NAMESPACE} delete secret ${TLS_SECRET} & > /dev/null
199+ kubectl -n ${NAMESPACE} delete secret ${TLS_SECRET} & > /dev/null || true
200200 fi
201201 fi
202202 fi
203203 # delete the certmanager certificate to prevent renewals
204- kubectl -n ${NAMESPACE} delete certificates.cert-manager.io ${TLS_SECRET} & > /dev/null
204+ kubectl -n ${NAMESPACE} delete certificates.cert-manager.io ${TLS_SECRET} & > /dev/null || true
205205 done
206206}
207207
17501750# remove any certificates for tls-acme false ingress to prevent reissuing attempts
17511751TLS_FALSE_INGRESSES=$( kubectl -n ${NAMESPACE} get ingress -o json | jq -r ' .items[] | select(.metadata.annotations["kubernetes.io/tls-acme"] == "false") | .metadata.name' )
17521752for TLS_FALSE_INGRESS in $TLS_FALSE_INGRESSES ; do
1753- cleanupCertificates " ${DI } " " true"
1753+ cleanupCertificates " ${TLS_FALSE_INGRESS } " " true"
17541754done
17551755
17561756currentStepEnd=" $( date +" %Y-%m-%d %H:%M:%S" ) "
You can’t perform that action at this time.
0 commit comments