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? # 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 ````powershell
127.0.0.1 eshop-st-web 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 127.0.0.1 eshop-st-gateway-web-public
```` ````
* Run `build-images.ps1` in the `build` directory. * Run `build-images.ps1` or `build-images.sh` in the `build` directory.
* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eshop` namespace. * 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*. * *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 * Browse https://eshop-st-public-web for public and https://eshop-st-web for web application
* Username: `admin`, password: `1q2w3E*`. * 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/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8" 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 cert-manager.io/cluster-issuer: letsencrypt
spec: spec:
ingressClassName: nginx ingressClassName: nginx
tls: tls:
- hosts: - hosts:
- {{ .Values.ingress.host }} - {{ .Values.ingress.host }}
{{- if eq .Release.Name "eshop-az" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
rules: rules:
{{- if eq .Release.Name "eshop-az" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.ingress.host }}" - host: "{{ .Values.ingress.host }}"
{{- end }}
http: http:
paths: paths:
- path: / - 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/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8" 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 cert-manager.io/cluster-issuer: letsencrypt
spec: spec:
ingressClassName: nginx ingressClassName: nginx
tls: tls:
- hosts: - hosts:
- {{ .Values.ingress.host }} - {{ .Values.ingress.host }}
{{- if eq .Release.Name "eshop-az" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
rules: rules:
{{- if eq .Release.Name "eshop-az" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.ingress.host }}" - host: "{{ .Values.ingress.host }}"
{{- end }}
http: http:
paths: paths:
- path: / - 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/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8" 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 cert-manager.io/cluster-issuer: letsencrypt
spec: spec:
ingressClassName: nginx ingressClassName: nginx
tls: tls:
- hosts: - hosts:
- {{ .Values.ingress.host }} - {{ .Values.ingress.host }}
{{- if eq .Release.Name "eshop-az" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls secretName: {{ .Release.Name }}-{{ .Chart.Name }}-tls
rules: rules:
{{- if eq .Release.Name "eshop-az" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.ingress.host }}" - host: "{{ .Values.ingress.host }}"
{{- end }}
http: http:
paths: paths:
- path: / - path: /

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

@ -2,7 +2,7 @@
authserver: authserver:
config: config:
selfUrl: https://auth.eshoponabp.com 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 allowedRedirectUrls: https://admin.eshoponabp.com
authServer: authServer:
authority: https://auth.eshoponabp.com authority: https://auth.eshoponabp.com
@ -25,7 +25,7 @@ authserver:
web: web:
config: config:
selfUrl: https://admin.eshoponabp.com selfUrl: https://admin.eshoponabp.com
gatewayUrl: https://www.gateway.eshoponabp.com gatewayUrl: https://gateway.eshoponabp.com
authServer: authServer:
authority: https://auth.eshoponabp.com authority: https://auth.eshoponabp.com
requireHttpsMetadata: "false" requireHttpsMetadata: "false"
@ -39,8 +39,8 @@ web:
# public-web sub-chart override # public-web sub-chart override
public-web: public-web:
config: config:
selfUrl: https://www.eshoponabp.com selfUrl: https://eshoponabp.com
gatewayUrl: https://www.gateway-public.eshoponabp.com/ gatewayUrl: https://gateway-public.eshoponabp.com/
authServer: authServer:
authority: https://auth.eshoponabp.com authority: https://auth.eshoponabp.com
requireHttpsMetadata: "false" requireHttpsMetadata: "false"
@ -59,7 +59,7 @@ public-web:
identity: identity:
config: config:
selfUrl: https://identity.eshoponabp.com 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: connectionStrings:
identityService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false" 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" 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 elasticsearchHost: eshop-az-elasticsearch
identityServerClients: # Seeded Clients identityServerClients: # Seeded Clients
webRootUrl: https://admin.eshoponabp.com/ webRootUrl: https://admin.eshoponabp.com/
publicWebRootUrl: https://www.eshoponabp.com/ publicWebRootUrl: https://eshoponabp.com/
webGatewayRootUrl: https://www.gateway.eshoponabp.com/ webGatewayRootUrl: https://gateway.eshoponabp.com/
publicWebGatewayRootUrl: https://www.gateway-public.eshoponabp.com/ publicWebGatewayRootUrl: https://gateway-public.eshoponabp.com/
identityServiceRootUrl: https://identity.eshoponabp.com/ identityServiceRootUrl: https://identity.eshoponabp.com/
administrationServiceRootUrl: https://administration.eshoponabp.com/ administrationServiceRootUrl: https://administration.eshoponabp.com/
accountServiceRootUrl: https://auth.eshoponabp.com accountServiceRootUrl: https://auth.eshoponabp.com
@ -94,7 +94,7 @@ identity:
administration: administration:
config: config:
selfUrl: https://administration.eshoponabp.com 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: connectionStrings:
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
authServer: authServer:
@ -120,7 +120,7 @@ administration:
# gateway-web sub-chart override # gateway-web sub-chart override
gateway-web: gateway-web:
config: config:
selfUrl: https://www.gateway.eshoponabp.com selfUrl: https://gateway.eshoponabp.com
corsOrigins: https://admin.eshoponabp.com corsOrigins: https://admin.eshoponabp.com
globalConfigurationBaseUrl: http://eshop-az-gateway-public globalConfigurationBaseUrl: http://eshop-az-gateway-public
authServer: authServer:
@ -152,7 +152,7 @@ gateway-web:
# gateway-web-public sub-chart override # gateway-web-public sub-chart override
gateway-web-public: gateway-web-public:
config: config:
selfUrl: https://www.gateway-public.eshoponabp.com selfUrl: https://gateway-public.eshoponabp.com
authServer: authServer:
authority: http://eshop-az-authserver authority: http://eshop-az-authserver
requireHttpsMetadata: "false" requireHttpsMetadata: "false"
@ -187,7 +187,7 @@ gateway-web-public:
basket: basket:
config: config:
selfUrl: https://basket.eshoponabp.com 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: connectionStrings:
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
authServer: authServer:
@ -212,7 +212,7 @@ basket:
catalog: catalog:
config: config:
selfUrl: https://catalog.eshoponabp.com 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: connectionStrings:
catalogService: "mongodb://eshop-az-mongodb/EShopOnAbp_Catalog" catalogService: "mongodb://eshop-az-mongodb/EShopOnAbp_Catalog"
administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
@ -240,7 +240,7 @@ catalog:
ordering: ordering:
config: config:
selfUrl: https://order.eshoponabp.com 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: connectionStrings:
orderingService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Ordering;User ID=postgres;password=myPassw0rd;Pooling=false" 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" administrationService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false"
@ -263,7 +263,7 @@ ordering:
payment: payment:
config: config:
selfUrl: https://payment.eshoponabp.com 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: connectionStrings:
paymentService: "Host=eshop-az-postgresdb;Port=5432;Database=EShopOnAbp_Payment;User ID=postgres;password=myPassw0rd;Pooling=false" 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" 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: authserver:
config: config:
selfUrl: https://eshop-st-authserver 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 allowedRedirectUrls: https://eshop-st-web
authServer:
authority: https://eshop-st-authserver
requireHttpsMetadata: "false"
connectionStrings: connectionStrings:
administrationService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Administration;User ID=postgres;password=myPassw0rd;Pooling=false" 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" identityService: "Host=eshop-st-postgresdb;Port=5432;Database=EShopOnAbp_Identity;User ID=postgres;password=myPassw0rd;Pooling=false"
@ -22,7 +25,10 @@ authserver:
web: web:
config: config:
selfUrl: https://eshop-st-web 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: ingress:
host: eshop-st-web host: eshop-st-web
image: image:
@ -33,9 +39,9 @@ web:
public-web: public-web:
config: config:
selfUrl: https://eshop-st-public-web selfUrl: https://eshop-st-public-web
gatewayUrl: http://eshop-st-gateway-web-public gatewayUrl: https://eshop-st-gateway-web-public
authServer: authServer:
authority: http://eshop-st-authserver authority: https://eshop-st-authserver
requireHttpsMetadata: "false" requireHttpsMetadata: "false"
dotnetEnv: Staging dotnetEnv: Staging
redisHost: eshop-st-redis redisHost: eshop-st-redis
@ -136,6 +142,10 @@ gateway-web:
url: http://eshop-st-identity url: http://eshop-st-identity
administrationService: administrationService:
url: http://eshop-st-administration 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 sub-chart override
gateway-web-public: gateway-web-public:
@ -188,8 +198,8 @@ basket:
rabbitmqHost: eshop-st-rabbitmq rabbitmqHost: eshop-st-rabbitmq
elasticsearchHost: eshop-st-elasticsearch elasticsearchHost: eshop-st-elasticsearch
remoteServices: remoteServices:
catalogBaseUrl: http://eshop-st-catalog catalogBaseUrl: http://eshop-st-catalog:80
catalogGrpcUrl: http://eshop-st-catalog catalogGrpcUrl: http://eshop-st-catalog:81
ingress: ingress:
host: eshop-st-basket host: eshop-st-basket
image: image:

Loading…
Cancel
Save