From a7a82dc67988865b7fe0ebfd97814432d652274c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 16 Feb 2022 15:33:57 +0100 Subject: [PATCH] adding k8s resolver and updating watchtower variable --- hosting/nginx.prod.conf.hbs | 5 ++++- packages/server/scripts/proxy/generateProxyConfig.js | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index f2a44488e0..2302956ed3 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -21,6 +21,9 @@ http { {{#if compose}} resolver 127.0.0.11 ipv6=off; {{/if}} + {{#if k8s}} + resolver kube-dns.kube-system.svc.cluster.local valid=10s; + {{/if}} # buffering @@ -73,7 +76,7 @@ http { {{#if watchtower}} location = /v1/update { - proxy_pass http://watchtower-service:8080; + proxy_pass http://$watchtower:8080; } {{/if}} location ~ ^/(builder|app_) { diff --git a/packages/server/scripts/proxy/generateProxyConfig.js b/packages/server/scripts/proxy/generateProxyConfig.js index 1c87308b13..591b320c70 100644 --- a/packages/server/scripts/proxy/generateProxyConfig.js +++ b/packages/server/scripts/proxy/generateProxyConfig.js @@ -5,12 +5,14 @@ const { processStringSync } = require("@budibase/string-templates") const Configs = { prod: { + k8s: true, apps: "app-service.budibase.svc.cluster.local", worker: "worker-service.budibase.svc.cluster.local", minio: "minio-service.budibase.svc.cluster.local", couchdb: "budibase-prod-svc-couchdb", }, preprod: { + k8s: true, apps: "app-service.budibase.svc.cluster.local", worker: "worker-service.budibase.svc.cluster.local", minio: "minio-service.budibase.svc.cluster.local",