new: [zato] auto schedule crt renew from letsencrypt certs

This commit is contained in:
Boris Gallet
2025-02-06 11:53:41 +01:00
parent 30ff0a39b6
commit 1048cb4ba6
4 changed files with 34 additions and 5 deletions

View File

@@ -1,14 +1,13 @@
#!/bin/bash
. lib/common
DOMAIN=$(relation-get domain) || exit 1
DEST_LETSENCRYPT_FULLCHAIN="$SERVICE_DATASTORE/opt/zato/letsencrypt-fullchain.pem"
CUSTOM_CREATE_LB_PATH="/opt/zato/3.2.0/code/zato-cli/src/zato/cli/create_lb.py"
set -e
mkdir -p "${DEST_LETSENCRYPT_FULLCHAIN%/*}"
cat $DATASTORE/letsencrypt/etc/letsencrypt/live/$DOMAIN/{fullchain,privkey}.pem > "$DEST_LETSENCRYPT_FULLCHAIN" || exit 1
merge_crt_letsencrypt "$DOMAIN"
# adding custom config file to handle https in load_balancer with letsencrypt-fullchain certificate
@@ -20,4 +19,4 @@ services:
- $DEST_LETSENCRYPT_FULLCHAIN:/opt/zato/letsencrypt-fullchain.pem
"
info "Configured $SERVICE_NAME load_balancer with HTTPS support."
info "Configured $SERVICE_NAME load_balancer with HTTPS support."