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()