Browse Source

Merge pull request #22 from abpframework/helm-chart-refactor

Helm Chart Refactor
pull/23/head
Enis Necipoglu 5 years ago
committed by GitHub
parent
commit
0e39bb8204
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      etc/README.md
  2. 4
      etc/k8s/deploy-staging.ps1
  3. 13
      etc/k8s/eshoponabp/charts/administration/templates/administration-deployment.yaml
  4. 27
      etc/k8s/eshoponabp/charts/administration/values.yaml
  5. 49
      etc/k8s/eshoponabp/charts/authserver/templates/authserver-deployment.yaml
  6. 12
      etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml
  7. 34
      etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml
  8. 33
      etc/k8s/eshoponabp/charts/authserver/values.yaml
  9. 6
      etc/k8s/eshoponabp/charts/gateway-internal/Chart.yaml
  10. 113
      etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml
  11. 34
      etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal.yaml
  12. 35
      etc/k8s/eshoponabp/charts/gateway-internal/values.yaml
  13. 6
      etc/k8s/eshoponabp/charts/gateway-public-web/Chart.yaml
  14. 37
      etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-ingress.yaml
  15. 14
      etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-service.yaml
  16. 35
      etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web.yaml
  17. 6
      etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml
  18. 6
      etc/k8s/eshoponabp/charts/gateway-web-public/Chart.yaml
  19. 30
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-configmap.yaml
  20. 52
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-deployment.yaml
  21. 18
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml
  22. 0
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-service.yaml
  23. 45
      etc/k8s/eshoponabp/charts/gateway-web-public/values.yaml
  24. 42
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml
  25. 54
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-deployment.yaml
  26. 18
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-ingress.yaml
  27. 34
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml
  28. 72
      etc/k8s/eshoponabp/charts/gateway-web/values.yaml
  29. 67
      etc/k8s/eshoponabp/charts/identity/templates/identity-deployment.yaml
  30. 10
      etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml
  31. 33
      etc/k8s/eshoponabp/charts/identity/templates/identity.yaml
  32. 57
      etc/k8s/eshoponabp/charts/identity/values.yaml
  33. 44
      etc/k8s/eshoponabp/charts/public-web/templates/public-web-deployment.yaml
  34. 24
      etc/k8s/eshoponabp/charts/public-web/templates/public-web-ingress.yaml
  35. 31
      etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml
  36. 23
      etc/k8s/eshoponabp/charts/public-web/values.yaml
  37. 10
      etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml
  38. 27
      etc/k8s/eshoponabp/charts/saas/templates/saas.yaml
  39. 31
      etc/k8s/eshoponabp/charts/saas/values.yaml
  40. 11
      etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml
  41. 24
      etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml
  42. 18
      etc/k8s/eshoponabp/charts/web/values.yaml
  43. 9
      etc/k8s/eshoponabp/templates/NOTES.txt
  44. 17
      etc/k8s/eshoponabp/templates/_helpers.tpl
  45. 262
      etc/k8s/eshoponabp/values.yaml
  46. 36
      etc/k8s/tls-cert/README.md
  47. 0
      etc/k8s/tls-cert/notes.md
  48. 10
      etc/scripts/build-images.ps1

7
etc/k8s/README.md → etc/README.md

@ -25,12 +25,11 @@ helm install ingress-nginx ingress-nginx/ingress-nginx
127.0.0.1 eshop-st-administration
127.0.0.1 eshop-st-saas
127.0.0.1 eshop-st-gateway-web
127.0.0.1 eshop-st-gateway-public-web
127.0.0.1 eshop-st-gateway-internal
127.0.0.1 eshop-st-gateway-web-public
````
* Run `build-images.ps1` in the `scripts` directory.
* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eventhub` namespace.
* Run `deploy-staging.ps1` 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://eshoponabp-public-web and https://eshoponabp-authserver
* Browse https://eshop-st-public-web for public and https://eshop-st-web for web application
* Username: `admin`, password: `1q2w3E*`.

4
etc/k8s/deploy-staging.ps1

@ -1,3 +1 @@
param ($version='latest')
helm upgrade --install es-st eshoponabp --namespace eshop --create-namespace --set global.eshoponabpImageVersion=$version
helm upgrade --install es-st eshoponabp --namespace eshop --create-namespace

13
etc/k8s/eshoponabp/charts/administration/templates/administration-deploy.yaml → etc/k8s/eshoponabp/charts/administration/templates/administration-deployment.yaml

@ -27,27 +27,26 @@ spec:
value: "{{ .Values.config.gatewayUrl }}"
- name: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: IdentityClients__IdentityClients__Authority
value: "{{ .Values.config.identityClientAuthority }}"
- name: IdentityClients__Default__Authority
value: "{{ .Values.synchedCommunication.authority }}"
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.config.connString }}
value: "{{ .Values.config.connectionStrings.administrationService }}"
- name: "ConnectionStrings__SaasService"
value: {{ .Values.config.saasService.connString }}
value: "{{ .Values.config.connectionStrings.saasService }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServerAuthority }}"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServerRequireHttpsMetadata }}"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

27
etc/k8s/eshoponabp/charts/administration/values.yaml

@ -2,17 +2,24 @@ config:
selfUrl: # https://eshop-st-administration
gatewayUrl: # https://eshop-st-gateway-internal/
corsOrigins: # https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal
identityClientAuthority: # https://eshop-st-authserver
connString: #
saasService:
connString: #
dotnetEnv: #
redisHost: #
rabbitmqHost: #
connectionStrings:
administrationService: #
saasService: #
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: #
authServerAuthority: #
authServerRequireHttpsMetadata: #
stringEncryptionDefaultPassPhrase: #
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
synchedCommunication:
grantType: # "client_credentials"
clientId: #
clientSecret: #
authority: https://eshop-st-authserver
scope: # "IdentityService"
ingress:
host: # eshop-st-administration

49
etc/k8s/eshoponabp/charts/authserver/templates/authserver-deployment.yaml

@ -0,0 +1,49 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: App__RedirectAllowedUrls
value: "{{ .Values.config.allowedRedirectUrls }}"
- name: "ConnectionStrings__IdentityService"
value: "{{ .Values.config.identityService.connString }}"
- name: "ConnectionStrings__AdministrationService"
value: "{{ .Values.config.administrationService.connString }}"
- name: "ConnectionStrings__SaasService"
value: "{{ .Values.config.saasService.connString }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

12
etc/k8s/eshoponabp/charts/authserver/templates/authserver-ingress.yaml

@ -3,21 +3,21 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_input_headers "from-ingress: true";
spec:
tls:
- hosts:
- {{ .Values.global.authServer.domain }}
secretName: {{ .Values.global.tlsSecret }}
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
- host: "{{ .Values.global.authServer.domain }}"
- host: "{{ .Values.ingress.host }}"
http:
paths:
- path: /

34
etc/k8s/eshoponabp/charts/authserver/templates/authserver.yaml

@ -1,34 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.authServer.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
- name: "ConnectionStrings__IdentityService"
value: {{ .Values.global.identityService.connString }}
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.global.administrationService.connString }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.global.saasService.connString }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

33
etc/k8s/eshoponabp/charts/authserver/values.yaml

@ -1,8 +1,27 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-authserver"
- name: "App__CorsOrigins"
value: "https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-saas"
- name: "App__RedirectAllowedUrls"
value: "http://localhost:4200"
config:
selfUrl: # https://eshop-st-authserver
corsOrigins: # https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-saas
allowedRedirectUrls: https://eshop-st-web
identityService:
connString: #
administrationService:
connString: #
saasService:
connString: #
dotnetEnv: #
redisHost: #
rabbitmqHost: #
elasticsearchHost: #
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: # eshop-st-authserver
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/app-authserver
tag: latest
pullPolicy: IfNotPresent
env: {}

6
etc/k8s/eshoponabp/charts/gateway-internal/Chart.yaml

@ -1,6 +0,0 @@
apiVersion: v2
name: gateway-internal
appVersion: "1.0"
description: eShopOnAbp Internal Web Gateway Application
version: 1.0.0
type: application

113
etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-configmap.yaml

@ -1,113 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap
data:
appsettings.json: |-
{
"Routes": [
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Saas Service",
"DownstreamPathTemplate": "/api/saas/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-saas",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/saas/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/feature-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/feature-management/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/permission-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/permission-management/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/setting-management/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/setting-management/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Payment Service",
"DownstreamPathTemplate": "/api/payment/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-payment",
"Port": 80
}
],
"UpstreamPathTemplate": "/api/payment/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
}]
}

34
etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal.yaml

@ -1,34 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.gatewayInternal.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/config
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

35
etc/k8s/eshoponabp/charts/gateway-internal/values.yaml

@ -1,35 +0,0 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-gateway-internal"
- name: "GlobalConfiguration__BaseUrl"
value: "http://eshop-st-gateway-internal"
- name: "Routes__0__DownstreamScheme"
value: "http"
- name: "Routes__0__DownstreamHostAndPorts__0__Host"
value: "eshop-st-identity"
- name: "Routes__0__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__1__DownstreamScheme"
value: "http"
- name: "Routes__1__DownstreamHostAndPorts__0__Host"
value: "eshop-st-identity"
- name: "Routes__1__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__2__DownstreamScheme"
value: "http"
- name: "Routes__2__DownstreamHostAndPorts__0__Host"
value: "eshop-st-saas"
- name: "Routes__2__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__3__DownstreamScheme"
value: "http"
- name: "Routes__3__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration"
- name: "Routes__3__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__4__DownstreamScheme"
value: "http"
- name: "Routes__4__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration"
- name: "Routes__4__DownstreamHostAndPorts__0__Port"
value: "80"

6
etc/k8s/eshoponabp/charts/gateway-public-web/Chart.yaml

@ -1,6 +0,0 @@
apiVersion: v2
name: gateway-public-web
appVersion: "1.0"
description: eShopOnAbp Public Web Gateway Application
version: 1.0.0
type: application

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

@ -1,37 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
{{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.gatewayPublicWeb.domain }}
{{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.global.gatewayPublicWeb.domain }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
rules:
{{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.global.gatewayPublicWeb.domain }}"
{{- else }}
- host: "{{ .Values.global.gatewayPublicWeb.domain }}"
{{- end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-{{ .Chart.Name }}
port:
number: 80

14
etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-service.yaml

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
name: {{ .Release.Name }}-{{ .Chart.Name }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
ports:
- name: "80"
port: 80
- name: "443"
port: 443
selector:
app: {{ .Release.Name }}-{{ .Chart.Name }}

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

@ -1,35 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.gatewayPublicWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/appsettings.json
subPath: appsettings.json
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

6
etc/k8s/eshoponabp/charts/gateway-public-web/values.yaml

@ -1,6 +0,0 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-gateway-public-web"
- name: "GlobalConfiguration__BaseUrl"
value: "http://eshop-st-gateway-public-web"

6
etc/k8s/eshoponabp/charts/gateway-web-public/Chart.yaml

@ -0,0 +1,6 @@
apiVersion: v2
name: gateway-web-public
appVersion: "1.0"
description: eShopOnAbp Web Public Gateway Application
version: 1.0.0
type: application

30
etc/k8s/eshoponabp/charts/gateway-public-web/templates/gateway-public-web-configmap.yaml → etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-configmap.yaml

@ -9,11 +9,11 @@ data:
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
"Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": {{ .Values.reRoutes.identityService.port }}
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
@ -22,11 +22,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
@ -35,11 +35,11 @@ data:
{
"ServiceKey": "Catalog Service",
"DownstreamPathTemplate": "/api/catalog/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.catalogService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-catalog",
"Port": 80
"Host": "{{ .Values.reRoutes.catalogService.host }}",
"Port": "{{ .Values.reRoutes.catalogService.port }}",
}
],
"UpstreamPathTemplate": "/api/catalog/{everything}",
@ -48,11 +48,11 @@ data:
{
"ServiceKey": "Basket Service",
"DownstreamPathTemplate": "/api/basket/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.basketService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-basket",
"Port": 80
"Host": "{{ .Values.reRoutes.basketService.host }}",
"Port": "{{ .Values.reRoutes.basketService.port }}",
}
],
"UpstreamPathTemplate": "/api/basket/{everything}",
@ -61,11 +61,11 @@ data:
{
"ServiceKey": "Ordering Service",
"DownstreamPathTemplate": "/api/ordering/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.orderService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-ordering",
"Port": 80
"Host": "{{ .Values.reRoutes.orderService.host }}",
"Port": "{{ .Values.reRoutes.orderService.port }}",
}
],
"UpstreamPathTemplate": "/api/ordering/{everything}",

52
etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-deployment.yaml

@ -0,0 +1,52 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/appsettings.json
subPath: appsettings.json
env:
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: GlobalConfiguration__BaseUrl
value: "{{ .Values.config.globalConfigurationBaseUrl }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

18
etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-ingress.yaml → etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-ingress.yaml

@ -3,28 +3,28 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.gatewayInternal.domain }}
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.global.gatewayInternal.domain }}
- {{ print "www." .Values.global.ingress.host }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
{{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.global.gatewayInternal.domain }}"
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.global.gatewayInternal.domain }}"
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:

0
etc/k8s/eshoponabp/charts/gateway-internal/templates/gateway-internal-service.yaml → etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-service.yaml

45
etc/k8s/eshoponabp/charts/gateway-web-public/values.yaml

@ -0,0 +1,45 @@
config:
selfUrl: https://eshop-st-gateway-public-web
globalConfigurationBaseUrl: http://eshop-st-gateway-public-web
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: #
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
reRoutes:
identityService:
schema: http
host: eshop-st-identity
port: 80
administrationService:
schema: http
host: eshop-st-administration
port: 80
catalogService:
schema: http
host: eshop-st-catalog
port: 80
basketService:
schema: http
host: eshop-st-basket
port: 80
orderService:
schema: http
host: eshop-st-order
port: 80
ingress:
host: eshop-st-gateway-web-public
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/gateway-web-public
tag: latest
pullPolicy: IfNotPresent
env: {}

42
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml

@ -9,11 +9,11 @@ data:
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/identity/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
"Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": {{ .Values.reRoutes.identityService.port }}
}
],
"UpstreamPathTemplate": "/api/identity/{everything}",
@ -22,11 +22,11 @@ data:
{
"ServiceKey": "Identity Service",
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-identity",
"Port": 80
"Host": "{{ .Values.reRoutes.identityService.host }}",
"Port": {{ .Values.reRoutes.identityService.port }}
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
@ -35,11 +35,11 @@ data:
{
"ServiceKey": "Saas Service",
"DownstreamPathTemplate": "/api/saas/{everything}",
"DownstreamScheme": "https",
"DownstreamScheme": "{{ .Values.reRoutes.saasService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-saas",
"Port": 80
"Host": "{{ .Values.reRoutes.saasService.host }}",
"Port": {{ .Values.reRoutes.saasService.port }}
}
],
"UpstreamPathTemplate": "/api/saas/{everything}",
@ -48,11 +48,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
@ -61,11 +61,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/feature-management/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/feature-management/{everything}",
@ -74,11 +74,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/permission-management/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/permission-management/{everything}",
@ -87,11 +87,11 @@ data:
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/setting-management/{everything}",
"DownstreamScheme": "http",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "eshop-st-administration",
"Port": 80
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/setting-management/{everything}",

54
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-deployment.yaml

@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/appsettings.json
subPath: appsettings.json
env:
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: GlobalConfiguration__BaseUrl
value: "{{ .Values.config.globalConfigurationBaseUrl }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

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

@ -3,28 +3,28 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.gatewayWeb.domain }}
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.global.gatewayWeb.domain }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
{{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.global.gatewayWeb.domain }}"
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.global.gatewayWeb.domain }}"
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:

34
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web.yaml

@ -1,34 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.gatewayWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/config
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

72
etc/k8s/eshoponabp/charts/gateway-web/values.yaml

@ -1,37 +1,35 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-gateway-web"
- name: "App__CorsOrigins"
value: "https://eshop-st-web"
- name: "GlobalConfiguration__BaseUrl"
value: "http://eshop-st-gateway-web"
- name: "Routes__0__DownstreamScheme"
value: "http"
- name: "Routes__0__DownstreamHostAndPorts__0__Host"
value: "eshop-st-identity"
- name: "Routes__0__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__1__DownstreamScheme"
value: "http"
- name: "Routes__1__DownstreamHostAndPorts__0__Host"
value: "eshop-st-identity"
- name: "Routes__1__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__2__DownstreamScheme"
value: "http"
- name: "Routes__2__DownstreamHostAndPorts__0__Host"
value: "eshop-st-saas"
- name: "Routes__2__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__3__DownstreamScheme"
value: "http"
- name: "Routes__3__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration"
- name: "Routes__3__DownstreamHostAndPorts__0__Port"
value: "80"
- name: "Routes__4__DownstreamScheme"
value: "http"
- name: "Routes__4__DownstreamHostAndPorts__0__Host"
value: "eshop-st-administration"
- name: "Routes__4__DownstreamHostAndPorts__0__Port"
value: "80"
config:
selfUrl: # https://eshop-st-gateway-web
corsOrigins: # localhost:4200
globalConfigurationBaseUrl: # http://eshop-st-gateway-web
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: #
redisHost: #
rabbitmqHost: #
elasticsearchHost: #
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
reRoutes:
identityService:
schema: http
host: eshop-st-identity
port: 80
administrationService:
schema: http
host: eshop-st-administration
port: 80
saasService:
schema: # http
host: # eshop-st-saas
port: # 80
ingress:
host: # eshop-st-gateway-web
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/gateway-web
tag: latest
pullPolicy: IfNotPresent
env: {}

67
etc/k8s/eshoponabp/charts/identity/templates/identity-deployment.yaml

@ -0,0 +1,67 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: "ConnectionStrings__IdentityService"
value: {{ .Values.config.connectionStrings.identityService }}
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.config.connectionStrings.administrationService }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.config.connectionStrings.saasService }}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
- name: "IdentityServerClients__Web__RootUrl"
value: {{ .Values.identityServerClients.webRootUrl }}
- name: "IdentityServerClients__PublicWeb__RootUrl"
value: {{ .Values.identityServerClients.publicWebRootUrl }}
- name: "IdentityServerClients__IdentityService__RootUrl"
value: {{ .Values.identityServerClients.identityServiceRootUrl }}
- name: "IdentityServerClients__SaasService__RootUrl"
value: {{ .Values.identityServerClients.saasServiceRootUrl }}
- name: "IdentityServerClients__AdministrationService__RootUrl"
value: {{ .Values.identityServerClients.administrationServiceRootUrl }}
- name: "IdentityServerClients__InternalGateway__RootUrl"
value: {{ .Values.identityServerClients.webRootUrl }}
- name: "IdentityServerClients__PublicWebGateway__RootUrl"
value: {{ .Values.identityServerClients.publicWebRootUrl }}
- name: "IdentityServerClients__WebGateway__RootUrl"
value: {{ .Values.identityServerClients.webGatewayRootUrl }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

10
etc/k8s/eshoponabp/charts/identity/templates/identity-ingress.yaml

@ -6,16 +6,16 @@ metadata:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.identityService.domain }}
secretName: {{ .Values.global.tlsSecret }}
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
- host: "{{ .Values.global.identityService.domain }}"
- host: "{{ .Values.ingress.host }}"
http:
paths:
- path: /

33
etc/k8s/eshoponabp/charts/identity/templates/identity.yaml

@ -1,33 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.identityService.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
- name: "ConnectionStrings__IdentityService"
value: {{ .Values.global.identityService.connString }}
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.global.administrationService.connString }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.global.saasService.connString }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

57
etc/k8s/eshoponabp/charts/identity/values.yaml

@ -1,22 +1,37 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-identity"
- name: "App__CorsOrigins"
value: "https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal"
- name: "IdentityServerClients__Web__RootUrl"
value: "https://eshop-st-web/"
- name: "IdentityServerClients__PublicWeb__RootUrl"
value: "https://eshop-st-public-web/"
- name: "IdentityServerClients__IdentityService__RootUrl"
value: "https://eshop-st-identity/"
- name: "IdentityServerClients__SaasService__RootUrl"
value: "https://eshop-st-saas/"
- name: "IdentityServerClients__AdministrationService__RootUrl"
value: "https://eshop-st-administration/"
- name: "IdentityServerClients__InternalGateway__RootUrl"
value: "https://eshop-st-gateway-internal/"
- name: "IdentityServerClients__PublicWebGateway__RootUrl"
value: "https://eshop-st-gateway-public-web/"
- name: "IdentityServerClients__WebGateway__RootUrl"
value: "https://eshop-st-gateway-web/"
config:
selfUrl: # https://eshop-st-identity
corsOrigins: # https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal
connectionStrings:
identityService: #
administrationService: #
saasService: #
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
# Seeded clients
identityServerClients:
webRootUrl: #
publicWebRootUrl: #
webGatewayRootUrl: #
publicWebGatewayRootUrl: #
identityServiceRootUrl: #
administrationServiceRootUrl: #
saasServiceRootUrl: #
ingress:
host: eshop-st-identity
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/service-identity
tag: latest
pullPolicy: IfNotPresent
env: {}

44
etc/k8s/eshoponabp/charts/public-web/templates/public-web-deployment.yaml

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: {{ .Values.config.selfUrl}}
- name: RemoteServices__Default__BaseUrl
value: {{ .Values.config.gatewayUrl}}
- name: "AuthServer__Authority"
value: {{ .Values.config.authServer.authority }}
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "DOTNET_ENVIRONMENT"
value: {{ .Values.config.dotnetEnv }}
- name: "Redis__Configuration"
value: {{ .Values.config.redisHost }}
- name: "StringEncryption__DefaultPassPhrase"
value: {{ .Values.config.stringEncryptionDefaultPassPhrase }}
- name: "RabbitMQ__Connections__Default__HostName"
value: {{ .Values.config.rabbitmqHost }}
- name: "ElasticSearch__Url"
value: {{ .Values.config.elasticsearchHost }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

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

@ -3,28 +3,28 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
{{- if eq .Release.Name "eh-az" }}
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.publicWeb.domain }}
{{- if eq .Release.Name "eh-az" }}
- {{ print "www." .Values.global.publicWeb.domain }}
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "es-az" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
{{- if eq .Release.Name "eh-az" }}
- host: "{{ print "www." .Values.global.publicWeb.domain }}"
{{- if eq .Release.Name "es-az" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.global.publicWeb.domain }}"
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:

31
etc/k8s/eshoponabp/charts/public-web/templates/public-web.yaml

@ -1,31 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.publicWeb.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: {{ .Values.config.selfUrl}}
- name: RemoteServices__Default__BaseUrl
value: {{ .Values.config.gatewayUrl}}
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

23
etc/k8s/eshoponabp/charts/public-web/values.yaml

@ -1,3 +1,22 @@
config:
selfUrl: "https://eshop-st-public-web"
gatewayUrl: "http://eshop-st-gateway-public-web/"
selfUrl: https://eshop-st-public-web
gatewayUrl: "http://eshop-st-gateway-web-public/"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: # eshop-st-public-web
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/app-publicweb
tag: latest
pullPolicy: IfNotPresent
env: {}

10
etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml

@ -6,16 +6,16 @@ metadata:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.saasService.domain }}
secretName: {{ .Values.global.tlsSecret }}
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
- host: "{{ .Values.global.saasService.domain }}"
- host: "{{ .Values.ingress.host }}"
http:
paths:
- path: /

27
etc/k8s/eshoponabp/charts/saas/templates/saas.yaml

@ -12,8 +12,8 @@ spec:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.saasService.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
@ -21,11 +21,28 @@ spec:
- name: https
containerPort: 443
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.global.administrationService.connString }}
value: {{ .Values.config.connectionStrings.administrationService }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.global.saasService.connString }}
value: {{ .Values.config.connectionStrings.saasService }}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

31
etc/k8s/eshoponabp/charts/saas/values.yaml

@ -1,6 +1,25 @@
env:
- name: "App__SelfUrl"
value: "https://eshop-st-saas"
- name: "App__CorsOrigins"
value: "https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal"
config:
selfUrl: https://eshop-st-saas
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal
connectionStrings:
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: eshop-st-saas
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/service-saas
tag: latest
pullPolicy: IfNotPresent
env: {}

11
etc/k8s/eshoponabp/charts/web/templates/web.yaml → etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml

@ -12,8 +12,8 @@ spec:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.global.web.containerImage }}:{{ .Values.global.eshoponabpImageVersion }}
imagePullPolicy: {{ .Values.global.imagePullPolicy }}
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
@ -21,7 +21,10 @@ spec:
- name: https
containerPort: 443
env:
{{ include "eshoponabp.global.env" . | indent 8 }}
{{- if .Values.env }}
- name: BASE_URL
value: {{ .Values.config.selfUrl}}
- name: API_URL
value: {{ .Values.config.gatewayUrl}}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

24
etc/k8s/eshoponabp/charts/web/templates/web-ingress.yaml

@ -3,28 +3,28 @@ kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: "{{ .Values.global.nginxProxyBufferSize }}"
nginx.ingress.kubernetes.io/proxy-buffers-number: "{{ .Values.global.nginxProxyBuffersNumber }}"
{{- if eq .Release.Name "eh-az" }}
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
{{- if eq .Release.Name "es-az" }}
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
{{- end }}
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.global.web.domain }}
{{- if eq .Release.Name "eh-az" }}
- {{ print "www." .Values.global.web.domain }}
- {{ .Values.ingress.host }}
{{- if eq .Release.Name "eh-es" }}
- {{ print "www." .Values.ingress.host }}
{{- end }}
secretName: {{ .Values.global.tlsSecret }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
{{- if eq .Release.Name "eh-az" }}
- host: "{{ print "www." .Values.global.web.domain }}"
{{- if eq .Release.Name "eh-es" }}
- host: "{{ print "www." .Values.ingress.host }}"
{{- else }}
- host: "{{ .Values.global.web.domain }}"
- host: "{{ .Values.ingress.host }}"
{{- end }}
http:
paths:

18
etc/k8s/eshoponabp/charts/web/values.yaml

@ -1,3 +1,15 @@
env:
- name: "BASE_URL"
value: "https://eshop-st-web"
config:
selfUrl: https://eshop-st-web
gatewayUrl: "https://eshop-st-gateway-web/"
ingress:
host: eshop-st-web
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/app-web
tag: latest
pullPolicy: IfNotPresent
# Extra environment variables or configurations
env: {}

9
etc/k8s/eshoponabp/templates/NOTES.txt

@ -1,5 +1,10 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
1. Web (Back Office) angular application URL:{{- if .Values.web.config.selfUrl }} {{ .Values.web.config.selfUrl }} {{- end }}
2. Public Web mvc application URL:{{- if index .Values "public-web" "config" "selfUrl" }} {{ index .Values "public-web" "config" "selfUrl" }} {{- end }}
3. Authentication Server URL:{{- if .Values.authserver.config.selfUrl }} {{ .Values.authserver.config.selfUrl }}
For RabbitMq Administration use:
"kubectl port-forward services/{{ .Release.Name }}-rabbitmq 15672:15672 -n {{ .Release.Namespace }}"
{{- else if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}

17
etc/k8s/eshoponabp/templates/_helpers.tpl

@ -60,20 +60,3 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{- define "eshoponabp.global.env" -}}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.global.dotnetEnvironment }}"
- name: "Redis__Configuration"
value: "{{ .Values.global.redisConfiguration }}"
- name: "AuthServer__Authority"
value: "{{ .Values.global.internalAuthServerAuthority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.global.internalAuthServerRequireHttpsMetadata }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.global.stringEncryptionDefaultPassPhrase }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.global.rabbitMqHostName }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.global.elasticSearchUrl }}"
{{- end }}

262
etc/k8s/eshoponabp/values.yaml

@ -1,3 +1,182 @@
# auth-server sub-chart override
authserver:
config:
selfUrl: https://eshop-st-authserver
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-gateway-internal
allowedRedirectUrls: https://eshop-st-web
identityService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
ingress:
host: eshop-st-authserver
image:
repository: "eshoponabp/app-authserver"
tag: latest
# web sub-chart override
web:
config:
selfUrl: https://eshop-st-web
gatewayUrl: "https://eshop-st-gateway-web/"
ingress:
host: eshop-st-web
image:
repository: "eshoponabp/app-web"
tag: latest
# public-web sub-chart override
public-web:
config:
selfUrl: https://eshop-st-public-web
gatewayUrl: "http://eshop-st-gateway-web-public/"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
ingress:
host: eshop-st-public-web
image:
repository: "eshoponabp/app-publicweb"
tag: latest
# identity-service sub-chart override
identity:
config:
selfUrl: https://eshop-st-identity
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public
connectionStrings:
identityService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
identityServerClients: # Seeded Clients
webRootUrl: https://eshop-st-web/
publicWebRootUrl: https://eshop-st-public-web/
webGatewayRootUrl: https://eshop-st-gateway-web/
publicWebGatewayRootUrl: https://eshop-st-gateway-web-public/
identityServiceRootUrl: https://eshop-st-identity/
administrationServiceRootUrl: https://eshop-st-administration/
saasServiceRootUrl: https://eshop-st-saas/
ingress:
host: eshop-st-identity
image:
repository: "eshoponabp/service-identity"
tag: latest
# administration sub-chart override
administration:
config:
selfUrl: https://eshop-st-administration
gatewayUrl: https://eshop-st-gateway-internal/
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-gateway-internal
connectionStrings:
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
synchedCommunication: # Used for server-to-server (client-credentials) communication with identityService for user permissions
authority: https://eshop-st-authserver
ingress:
host: eshop-st-administration
image:
repository: "eshoponabp/service-administration"
tag: latest
# gateway-web sub-chart override
gateway-web:
config:
selfUrl: https://eshop-st-gateway-web
corsOrigins: https://eshop-st-web
globalConfigurationBaseUrl: http://eshop-st-gateway-public
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: eshop-st-gateway-web
image:
repository: "eshoponabp/gateway-web"
tag: latest
reRoutes:
identityService:
schema: http
host: eshop-st-identity
port: 80
administrationService:
schema: http
host: eshop-st-administration
port: 80
saasService:
schema: http
host: eshop-st-saas
port: 80
# gateway-web-public sub-chart override
gateway-web-public:
config:
selfUrl: https://eshop-st-gateway-web-public
globalConfigurationBaseUrl: http://eshop-st-gateway-public-web
authServer:
authority: http://eshop-st-AUTHSERVER
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: eshop-st-gateway-web-public
image:
repository: "eshoponabp/gateway-web-public"
tag: latest
reRoutes:
identityService:
schema: http
host: eshop-st-identity
port: 80
administrationService:
schema: http
host: eshop-st-administration
port: 80
catalogService:
schema: http
host: eshop-st-catalog
port: 80
basketService:
schema: http
host: eshop-st-basket
port: 80
orderService:
schema: http
host: eshop-st-order
port: 80
# Default values for eshoponabp.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
@ -10,11 +189,6 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""
# administration:
# env:
# - name: "ADMIN_SPECIFIC_ENV_NAME"
# value: "ADMIN_SPECIFIC_ENV_VALUE"
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
@ -84,80 +258,4 @@ nodeSelector: {}
tolerations: []
affinity: {}
# sub-chart overrides
administration:
config:
selfUrl: https://eshop-st-administration
gatewayUrl: https://eshop-st-gateway-internal/
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal
identityClientAuthority: https://eshop-st-authserver
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
authServerAuthority: http://eshop-st-authserver
authServerRequireHttpsMetadata: "false"
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: eshop-st-administration
image:
repository: "eshoponabp/service-administration"
tag: latest
global:
dotnetEnvironment: "Staging"
imagePullPolicy: Never
eshoponabpImageVersion: latest
tlsSecret: eshop-demo-tls
web:
domain: eshop-st-web
url: https://eshop-st-web
containerImage: "eshoponabp/app-web"
publicWeb:
domain: eshop-st-public-web
url: https://eshop-st-public-web
containerImage: "eshoponabp/app-publicweb"
authServer:
domain: eshop-st-authserver
url: https://eshop-st-authserver
containerImage: "eshoponabp/app-authserver"
identityService:
domain: eshop-st-identity
url: https://eshop-st-identity
containerImage: "eshoponabp/service-identity"
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService:
domain: eshop-st-administration
url: https://eshop-st-administration
containerImage: "eshoponabp/service-administration"
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService:
domain: eshop-st-saas
url: https://eshop-st-saas
containerImage: "eshoponabp/service-saas"
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
gatewayWeb:
domain: eshop-st-gateway-web
url: https://eshop-st-gateway-web
containerImage: "eshoponabp/gateway-web"
gatewayPublicWeb:
domain: eshop-st-gateway-public-web
url: https://eshop-st-gateway-public-web
containerImage: "eshoponabp/gateway-publicweb"
gatewayInternal:
domain: eshop-st-gateway-internal
url: https://eshop-st-gateway-internal
containerImage: "eshoponabp/gateway-internal"
redisConfiguration: "es-st-redis"
rabbitMqHostName: "es-st-rabbitmq"
elasticSearchUrl: ""
nginxProxyBufferSize: "32k"
nginxProxyBuffersNumber: "8"
internalAuthServerAuthority: "http://eshop-st-authserver"
internalAuthServerRequireHttpsMetadata: "false"
stringEncryptionDefaultPassPhrase: "gsKnGZ041HLL4IM8"
affinity: {}

36
etc/k8s/tls-cert/README.md

@ -1,36 +0,0 @@
### Pre-requirements
* Docker Desktop with Kubernetes enabled
* Install [NGINX ingress](https://kubernetes.github.io/ingress-nginx/deploy/) for k8s
OR
* Install NGINX ingress using helm
```powershell
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx
```
* Install [Helm](https://helm.sh/docs/intro/install/) for running helm charts
### How to run?
* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`):
````powershell
127.0.0.1 eshop-st-web
127.0.0.1 eshop-st-public-web
127.0.0.1 eshop-st-authserver
127.0.0.1 eshop-st-identity
127.0.0.1 eshop-st-administration
127.0.0.1 eshop-st-saas
127.0.0.1 eshop-st-gateway-web
127.0.0.1 eshop-st-gateway-public-web
127.0.0.1 eshop-st-gateway-internal
````
* Run `build-images.ps1` in the `scripts` directory.
* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eventhub` namespace.
* *You may wait ~30 seconds on first run for preparing the database*.
* Browse https://eshoponabp-public-web and https://eshoponabp-authserver
* Username: `admin`, password: `1q2w3E*`.

0
etc/k8s/eshoponabp/notes.md → etc/k8s/tls-cert/notes.md

10
etc/scripts/build-images.ps1

@ -7,7 +7,7 @@ $authserverFolder = Join-Path $slnFolder "apps/auth-server/src/EShopOnAbp.AuthSe
$publicWebFolder = Join-Path $slnFolder "apps/public-web/src/EShopOnAbp.PublicWeb"
$webGatewayFolder = Join-Path $slnFolder "gateways/web/src/EShopOnAbp.WebGateway"
$publicWebGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnAbp.WebPublicGateway"
$webPublicGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnAbp.WebPublicGateway"
$internalGatewayFolder = Join-Path $slnFolder "gateways/internal/src/EShopOnAbp.InternalGateway"
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
@ -29,7 +29,7 @@ dotnet publish -c Release
docker build -t eshoponabp/app-authserver:$version .
### PUBLIC-WEB
Write-Host "*** BUILDING PUBLIC-WEB ****************" -ForegroundColor Green
Write-Host "*** BUILDING WEB-PUBLIC ****************" -ForegroundColor Green
Set-Location $publicWebFolder
dotnet publish -c Release
docker build -t eshoponabp/app-publicweb:$version .
@ -41,10 +41,10 @@ dotnet publish -c Release
docker build -t eshoponabp/gateway-web:$version .
### PUBLICWEB-GATEWAY
Write-Host "*** BUILDING PUBLICWEB-GATEWAY ****************" -ForegroundColor Green
Set-Location $publicWebGatewayFolder
Write-Host "*** BUILDING WEB-PUBLIC-GATEWAY ****************" -ForegroundColor Green
Set-Location $webPublicGatewayFolder
dotnet publish -c Release
docker build -t eshoponabp/gateway-publicweb:$version .
docker build -t eshoponabp/gateway-web-public:$version .
### INTERNAL-GATEWAY
Write-Host "*** BUILDING INTERNAL-GATEWAY ****************" -ForegroundColor Green

Loading…
Cancel
Save