diff --git a/apps/angular/dynamic-env.json b/apps/angular/dynamic-env.json index 6084fb35..a6f6c356 100644 --- a/apps/angular/dynamic-env.json +++ b/apps/angular/dynamic-env.json @@ -8,7 +8,7 @@ "oAuthConfig": { "issuer": "https://eshop-st-authserver", "redirectUri": "https://eshop-st-web", - "clientId": "EShopOnAbp_App", + "clientId": "Web", "responseType": "code", "scope": "offline_access openid profile email phone IdentityService AdministrationService" }, diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml new file mode 100644 index 00000000..aa36193a --- /dev/null +++ b/etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap +data: + dynamic-env.json: |- + { + "production": "true", + "application": { + "baseUrl": "{{ .Values.config.selfUrl }}", + "name": "EShopOnAbp", + "logoUrl": "" + }, + "oAuthConfig": { + "issuer": "{{ .Values.config.authServer.authority }}", + "redirectUri": "{{ .Values.config.selfUrl }}", + "requireHttps": "{{ .Values.config.authServer.requireHttpsMetadata }}", + "clientId": "Web", + "responseType": "code", + "scope": "offline_access openid profile email phone IdentityService AdministrationService" + }, + "apis": { + "default": { + "url": "{{ .Values.config.gatewayUrl }}", + "rootNamespace": "EShopOnAbp" + } + } + } \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml b/etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml index cbe7b699..cb7edabe 100644 --- a/etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml +++ b/etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml @@ -20,11 +20,15 @@ spec: containerPort: 80 - name: https containerPort: 443 + volumeMounts: + - name: config-volume + mountPath: /app/dynamic-env.json + subPath: dynamic-env.json env: - - name: BASE_URL - value: {{ .Values.config.selfUrl}} - - name: API_URL - value: {{ .Values.config.gatewayUrl}} {{- if .Values.env }} {{ toYaml .Values.env | indent 8 }} - {{- end }} \ No newline at end of file + {{- end }} + volumes: + - name: config-volume + configMap: + name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap \ No newline at end of file diff --git a/etc/k8s/eshoponabp/charts/web/values.yaml b/etc/k8s/eshoponabp/charts/web/values.yaml index db30b07e..83e4b444 100644 --- a/etc/k8s/eshoponabp/charts/web/values.yaml +++ b/etc/k8s/eshoponabp/charts/web/values.yaml @@ -1,6 +1,9 @@ config: selfUrl: https://eshop-st-web gatewayUrl: "https://eshop-st-gateway-web/" + authServer: + authority: http://eshop-st-authserver + requireHttpsMetadata: "false" ingress: host: eshop-st-web