autoconf - basic ingress controller support for kubernetes

This commit is contained in:
bunkerity
2021-08-03 16:39:39 +02:00
parent 021147f9d9
commit 4e178b474c
10 changed files with 227 additions and 80 deletions

View File

@@ -17,7 +17,7 @@ trap "trap_exit" TERM INT QUIT
# trap SIGHUP
function trap_reload() {
log "reload" "INFO" "catched reload operation"
if [ "$SWARM_MODE" != "yes" ] ; then
if [ "$SWARM_MODE" != "yes" ] && [ "$KUBERNETES_MODE" != "yes" ] ; then
/opt/bunkerized-nginx/entrypoint/jobs.sh
fi
if [ -f /tmp/nginx.pid ] ; then
@@ -40,10 +40,10 @@ if [ ! -f "/etc/nginx/global.env" ] ; then
log "entrypoint" "INFO" "configuring bunkerized-nginx ..."
# check permissions
if [ "$SWARM_MODE" != "yes" ] ; then
if [ "$SWARM_MODE" != "yes" ] && [ "$KUBERNETES_MODE" != "yes" ] ; then
/opt/bunkerized-nginx/entrypoint/permissions.sh
else
/opt/bunkerized-nginx/entrypoint/permissions-swarm.sh
/opt/bunkerized-nginx/entrypoint/permissions-cluster.sh
fi
if [ "$?" -ne 0 ] ; then
exit 1

View File

@@ -4,7 +4,7 @@
. /opt/bunkerized-nginx/entrypoint/utils.sh
# start nginx with temp conf for let's encrypt challenges and API
if [ "$(has_value AUTO_LETS_ENCRYPT yes)" != "" ] || [ "$SWARM_MODE" = "yes" ] || [ "$AUTO_LETS_ENCRYPT" = "yes" ] ; then
if [ "$(has_value AUTO_LETS_ENCRYPT yes)" != "" ] || [ "$SWARM_MODE" = "yes" ] || [ "$AUTO_LETS_ENCRYPT" = "yes" ] || [ "$KUBERNETES_MODE" = "yes" ] ; then
cp /opt/bunkerized-nginx/confs/global/nginx-temp.conf /tmp/nginx-temp.conf
cp /opt/bunkerized-nginx/confs/global/api-temp.conf /tmp/api.conf
if [ "$SWARM_MODE" = "yes" ] ; then