Browse Source

fix ingress and values files for local k8s

pull/116/head
selmankoc 4 years ago
parent
commit
9f3ac58200
  1. 6
      etc/README.md
  2. 10
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml
  3. 10
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml
  4. 10
      etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml
  5. 30
      etc/k8s/eshoponabp/values.azure.yaml
  6. 22
      etc/k8s/eshoponabp/values.yaml

6
etc/README.md

@ -17,7 +17,7 @@ helm upgrade --install --version=4.0.19 ingress-nginx ingress-nginx/ingress-ngin
# How to run?
* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`):
* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`, in linux and macos: `/etc/hosts` ):
````powershell
127.0.0.1 eshop-st-web
@ -33,8 +33,8 @@ helm upgrade --install --version=4.0.19 ingress-nginx ingress-nginx/ingress-ngin
127.0.0.1 eshop-st-gateway-web-public
````
* Run `build-images.ps1` in the `build` directory.
* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eshop` namespace.
* Run `build-images.ps1` or `build-images.sh` in the `build` directory.
* Run `deploy-staging.ps1` or `deploy-staging.sh` in the `helm-chart` directory. It is deployed with the `eshop` namespace.
* *You may wait ~30 seconds on first run for preparing the database*.
* Browse https://eshop-st-public-web for public and https://eshop-st-web for web application
* Username: `admin`, password: `1q2w3E*`.

10
etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml

@ -7,25 +7,15 @@ 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: /

10
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml

@ -7,25 +7,15 @@ 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: /

10
etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml

@ -7,25 +7,15 @@ 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: /

30
etc/k8s/eshoponabp/values.azure.yaml

@ -2,7 +2,7 @@
authserver:
config:
selfUrl: https://auth.eshoponabp.com
corsOrigins: https://www.gateway.eshoponabp.com,https://www.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://eshoponabp.com
allowedRedirectUrls: https://admin.eshoponabp.com
authServer:
authority: https://auth.eshoponabp.com
@ -25,7 +25,7 @@ authserver:
web:
config:
selfUrl: https://admin.eshoponabp.com
gatewayUrl: https://www.gateway.eshoponabp.com
gatewayUrl: https://gateway.eshoponabp.com
authServer:
authority: https://auth.eshoponabp.com
requireHttpsMetadata: "false"
@ -39,8 +39,8 @@ web:
# public-web sub-chart override
public-web:
config:
selfUrl: https://www.eshoponabp.com
gatewayUrl: https://www.gateway-public.eshoponabp.com/
selfUrl: https://eshoponabp.com
gatewayUrl: https://gateway-public.eshoponabp.com/
authServer:
authority: https://auth.eshoponabp.com
requireHttpsMetadata: "false"
@ -59,7 +59,7 @@ public-web:
identity:
config:
selfUrl: https://identity.eshoponabp.com
corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com
corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com
connectionStrings:
identityService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false"
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
@ -74,9 +74,9 @@ identity:
elasticsearchHost: eshop-az-elasticsearch
identityServerClients: # Seeded Clients
webRootUrl: https://admin.eshoponabp.com/
publicWebRootUrl: https://www.eshoponabp.com/
webGatewayRootUrl: https://www.gateway.eshoponabp.com/
publicWebGatewayRootUrl: https://www.gateway-public.eshoponabp.com/
publicWebRootUrl: https://eshoponabp.com/
webGatewayRootUrl: https://gateway.eshoponabp.com/
publicWebGatewayRootUrl: https://gateway-public.eshoponabp.com/
identityServiceRootUrl: https://identity.eshoponabp.com/
administrationServiceRootUrl: https://administration.eshoponabp.com/
accountServiceRootUrl: https://auth.eshoponabp.com
@ -94,7 +94,7 @@ identity:
administration:
config:
selfUrl: https://administration.eshoponabp.com
corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://eshop-az-gateway-internal
corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://eshop-az-gateway-internal
connectionStrings:
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
authServer:
@ -120,7 +120,7 @@ administration:
# gateway-web sub-chart override
gateway-web:
config:
selfUrl: https://www.gateway.eshoponabp.com
selfUrl: https://gateway.eshoponabp.com
corsOrigins: https://admin.eshoponabp.com
globalConfigurationBaseUrl: http://eshop-az-gateway-public
authServer:
@ -152,7 +152,7 @@ gateway-web:
# gateway-web-public sub-chart override
gateway-web-public:
config:
selfUrl: https://www.gateway-public.eshoponabp.com
selfUrl: https://gateway-public.eshoponabp.com
authServer:
authority: http://eshop-az-authserver
requireHttpsMetadata: "false"
@ -187,7 +187,7 @@ gateway-web-public:
basket:
config:
selfUrl: https://basket.eshoponabp.com
corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://www.eshoponabp.com
corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://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://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com,https://www.eshoponabp.com,https://admin.eshoponabp.com
corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com,https://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"
@ -240,7 +240,7 @@ catalog:
ordering:
config:
selfUrl: https://order.eshoponabp.com
corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com
corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com
connectionStrings:
orderingService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Ordering;User ID=postgres;password=myPassw0rd;Pooling=false"
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
@ -263,7 +263,7 @@ ordering:
payment:
config:
selfUrl: https://payment.eshoponabp.com
corsOrigins: https://www.gateway.eshoponabp.com,https://www.gateway-public.eshoponabp.com
corsOrigins: https://gateway.eshoponabp.com,https://gateway-public.eshoponabp.com
connectionStrings:
paymentService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Payment;User ID=postgres;password=myPassw0rd;Pooling=false"
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"

22
etc/k8s/eshoponabp/values.yaml

@ -2,8 +2,11 @@
authserver:
config:
selfUrl: https://eshop-st-authserver
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-basket,https://eshop-st-catalog,https://eshop-st-ordering,https://eshop-st-payment
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-basket,https://eshop-st-catalog,https://eshop-st-ordering,https://eshop-st-payment,https://eshop-st-web,https://eshop-st-public-web
allowedRedirectUrls: https://eshop-st-web
authServer:
authority: https://eshop-st-authserver
requireHttpsMetadata: "false"
connectionStrings:
administrationService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
identityService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false"
@ -22,7 +25,10 @@ authserver:
web:
config:
selfUrl: https://eshop-st-web
gatewayUrl: "https://eshop-st-gateway-web/"
gatewayUrl: https://eshop-st-gateway-web
authServer:
authority: https://eshop-st-authserver
requireHttpsMetadata: "false"
ingress:
host: eshop-st-web
image:
@ -33,9 +39,9 @@ web:
public-web:
config:
selfUrl: https://eshop-st-public-web
gatewayUrl: http://eshop-st-gateway-web-public
gatewayUrl: https://eshop-st-gateway-web-public
authServer:
authority: http://eshop-st-authserver
authority: https://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: eshop-st-redis
@ -136,6 +142,10 @@ gateway-web:
url: http://eshop-st-identity
administrationService:
url: http://eshop-st-administration
catalogService:
url: http://eshop-st-catalog
orderingService:
url: http://eshop-st-ordering
# gateway-web-public sub-chart override
gateway-web-public:
@ -188,8 +198,8 @@ basket:
rabbitmqHost: eshop-st-rabbitmq
elasticsearchHost: eshop-st-elasticsearch
remoteServices:
catalogBaseUrl: http://eshop-st-catalog
catalogGrpcUrl: http://eshop-st-catalog
catalogBaseUrl: http://eshop-st-catalog:80
catalogGrpcUrl: http://eshop-st-catalog:81
ingress:
host: eshop-st-basket
image:

Loading…
Cancel
Save