From ac7006f33ccf55a662127be9e5e58687b8d8012f Mon Sep 17 00:00:00 2001 From: selmankoc Date: Thu, 9 Jun 2022 16:16:30 +0300 Subject: [PATCH] rollback public-web ingress hostname --- .../public-web/templates/public-web-ingress.yaml | 10 ++++++++++ etc/k8s/eshoponabp/values.azure.yaml | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml index 8482c393..ccba5219 100644 --- a/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml +++ b/etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml @@ -7,15 +7,25 @@ metadata: nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffers-number: "8" +{{- if eq .Release.Name "eshop-az" }} + nginx.ingress.kubernetes.io/from-to-www-redirect: "true" +{{- end }} cert-manager.io/cluster-issuer: letsencrypt spec: ingressClassName: nginx tls: - hosts: - {{ .Values.ingress.host }} +{{- if eq .Release.Name "eshop-az" }} + - {{ print "www." .Values.ingress.host }} +{{- end }} secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls rules: +{{- if eq .Release.Name "eshop-az" }} + - host: "{{ print "www." .Values.ingress.host }}" +{{- else }} - host: "{{ .Values.ingress.host }}" +{{- end }} http: paths: - path: / diff --git a/etc/k8s/eshoponabp/values.azure.yaml b/etc/k8s/eshoponabp/values.azure.yaml index 85563992..e33b861d 100644 --- a/etc/k8s/eshoponabp/values.azure.yaml +++ b/etc/k8s/eshoponabp/values.azure.yaml @@ -2,7 +2,7 @@ authserver: config: selfUrl: https://auth.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://identity.eshoponabp.com,https://administration.eshoponabp.com,https://basket.eshoponabp.com,https://catalog.eshoponabp.com,https://order.eshoponabp.com,https://payment.eshoponabp.com,https://admin.eshoponabp.com,https://www.eshoponabp.com allowedRedirectUrls: https://admin.eshoponabp.com authServer: authority: https://auth.eshoponabp.com @@ -39,7 +39,7 @@ web: # public-web sub-chart override public-web: config: - selfUrl: https://eshoponabp.com + selfUrl: https://www.eshoponabp.com gatewayUrl: https://gateway-public.eshoponabp.com/ authServer: authority: https://auth.eshoponabp.com @@ -74,7 +74,7 @@ identity: elasticsearchHost: eshop-az-elasticsearch identityServerClients: # Seeded Clients webRootUrl: https://admin.eshoponabp.com/ - publicWebRootUrl: https://eshoponabp.com/ + publicWebRootUrl: https://www.eshoponabp.com/ webGatewayRootUrl: https://gateway.eshoponabp.com/ publicWebGatewayRootUrl: https://gateway-public.eshoponabp.com/ identityServiceRootUrl: https://identity.eshoponabp.com/ @@ -187,7 +187,7 @@ gateway-web-public: basket: config: selfUrl: https://basket.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://www.eshoponabp.com connectionStrings: administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" authServer: @@ -212,7 +212,7 @@ basket: catalog: config: selfUrl: https://catalog.eshoponabp.com - corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshoponabp.com,https://admin.eshoponabp.com + corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://www.eshoponabp.com,https://admin.eshoponabp.com connectionStrings: catalogService: "mongodb://eshop-az-mongodb/EShopOnAbp_Catalog" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"