Skip to content

Commit

Permalink
fix: tls cleanup error on ingress with no tls (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketeerbkw authored Oct 25, 2023
1 parent 1882d5d commit f367c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion legacy/build-deploy-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ fi
# remove any certificates for tls-acme false ingress to prevent reissuing attempts
TLS_FALSE_INGRESSES=$(kubectl -n ${NAMESPACE} get ingress -o json | jq -r '.items[] | select(.metadata.annotations["kubernetes.io/tls-acme"] == "false") | .metadata.name')
for TLS_FALSE_INGRESS in $TLS_FALSE_INGRESSES; do
TLS_SECRETS=$(kubectl -n ${NAMESPACE} get ingress ${TLS_FALSE_INGRESS} -o json | jq -r '.spec.tls[].secretName')
TLS_SECRETS=$(kubectl -n ${NAMESPACE} get ingress ${TLS_FALSE_INGRESS} -o json | jq -r '.spec.tls[]?.secretName')
for TLS_SECRET in $TLS_SECRETS; do
if kubectl -n ${NAMESPACE} get certificates.cert-manager.io ${TLS_SECRET} &> /dev/null; then
echo ">> Cleaning up certificate for ${TLS_SECRET} as tls-acme is set to false"
Expand Down

0 comments on commit f367c37

Please sign in to comment.