nginx-profile-setup/kaproxy/gencerts.sh
Ava Hahn 5ada8f8d8a more arduous config and more debug symbols
Signed-off-by: Ava Hahn <a.hahn@f5.com>
2025-08-26 23:25:38 +00:00

25 lines
572 B
Bash
Executable file

#!/bin/bash
for iter in {0..999}; do
echo "minting cert $iter"
openssl req -x509 \
-newkey rsa:4096 \
-keyout key$iter.pem \
-out cert$iter.pem \
-sha256 -nodes \
-days 3650 \
-quiet \
-subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=kaproxy-$iter"
upstr=$(($iter%10))
echo '
location /$iter {
proxy_ssl_certificate /cert$iter.pem;
proxy_ssl_certificate_key /key$iter.pem;
proxy_pass http://kasvc-$upstr:8080;
}' >> /nginx.conf
done
echo '
}
}
' >> /nginx.conf