From c2cb1be9b248ebc775c36b334eac65ff6a6e3ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=C5=9Fak=20ERDEM?= Date: Sat, 23 Oct 2021 22:55:01 +0300 Subject: [PATCH] updated configmap --- .../templates/public-webgateway-configmap.yaml | 4 +--- .../public-webgateway/templates/public-webgateway.yaml | 7 +++++++ .../web-public/src/EShopOnAbp.WebPublicGateway/Program.cs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml index 4a579d92..895fefac 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway-configmap.yaml @@ -1,9 +1,7 @@ apiVersion: v1 kind: ConfigMap metadata: - labels: - name: {{ .Release.Name }}-{{ .Chart.Name }} - name: {{ .Release.Name }}-{{ .Chart.Name }} + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap data: appsettings.json: |- { diff --git a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml index 470e520d..8965e966 100644 --- a/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml +++ b/etc/k8s/eshoponabp/charts/public-webgateway/templates/public-webgateway.yaml @@ -20,5 +20,12 @@ spec: containerPort: 80 - name: https containerPort: 443 + volumeMounts: + - name: config-volume + mountPath: /app/config env: {{ include "eshoponabp.global.env" . | indent 8 }} + volumes: + - name: config-volume + configMap: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap \ No newline at end of file diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs index cd7274fa..7e4b70f7 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs +++ b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/Program.cs @@ -37,7 +37,7 @@ namespace EShopOnAbp.WebPublicGateway Host.CreateDefaultBuilder(args) .ConfigureAppConfiguration(build => { - build.AddJsonFile("appsettings.secrets.json", optional: true); + build.AddJsonFile("appsettings.secrets.json", optional: true, reloadOnChange:true); }) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }) .UseAutofac()