Browse Source

updateg gateway-web

pull/103/head
Galip Tolga Erdem 5 years ago
parent
commit
34f740d30b
  1. 164
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml
  2. 4
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-deployment.yaml
  3. 12
      etc/k8s/eshoponabp/charts/gateway-web/values.yaml

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

@ -3,88 +3,90 @@ kind: ConfigMap
metadata: metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap
data: data:
ocelot.json: |- yarp.json: |-
{ {
"GlobalConfiguration": { "ReverseProxy": {
"BaseUrl": "{{ .Values.config.globalConfigurationBaseUrl }}" "Routes": {
}, "Account Service": {
"Routes": [ "ClusterId": "account-cluster",
{ "Match": {
"ServiceKey": "Identity Service", "Path": "/api/account/{**everything}"
"DownstreamPathTemplate": "/api/identity/{everything}", }
"DownstreamScheme": "{{ .Values.reRoutes.identityService.schema }}", },
"DownstreamHostAndPorts": [ "Identity Service": {
{ "ClusterId": "identity-cluster",
"Host": "{{ .Values.reRoutes.identityService.host }}", "Match": {
"Port": {{ .Values.reRoutes.identityService.port }} "Path": "/api/identity/{**everything}"
} }
], },
"UpstreamPathTemplate": "/api/identity/{everything}", "Administration Service": {
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "ClusterId": "administration-cluster",
}, "Match": {
{ "Path": "/api/abp/{**everything}"
"ServiceKey": "Account Service", }
"DownstreamPathTemplate": "/api/account/{everything}", },
"DownstreamScheme": "{{ .Values.reRoutes.accountService.schema }}", "feature-management-route": {
"DownstreamHostAndPorts": [ "ClusterId": "feature-management-cluster",
{ "Match": {
"Host": "{{ .Values.reRoutes.accountService.host }}", "Path": "/api/feature-management/{**everything}"
"Port": {{ .Values.reRoutes.accountService.port }} }
} },
], "permission-management-route": {
"UpstreamPathTemplate": "/api/account/{everything}", "ClusterId": "permission-management-cluster",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "Match": {
}, "Path": "/api/permission-management/{**everything}"
{ }
"ServiceKey": "Administration Service", },
"DownstreamPathTemplate": "/api/abp/{everything}", "setting-management-route": {
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}", "ClusterId": "setting-management-cluster",
"DownstreamHostAndPorts": [ "Match": {
{ "Path": "/api/setting-management/{**everything}"
"Host": "{{ .Values.reRoutes.administrationService.host }}", }
"Port": "{{ .Values.reRoutes.administrationService.port }}",
} }
], },
"UpstreamPathTemplate": "/api/abp/{everything}", "Clusters": {
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "account-cluster": {
}, "Destinations": {
{ "destination1": {
"ServiceKey": "Administration Service", "Address": "{{ .Values.reRoutes.accountService.url }}"
"DownstreamPathTemplate": "/api/feature-management/{everything}", }
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}", }
"DownstreamHostAndPorts": [ },
{ "identity-cluster": {
"Host": "{{ .Values.reRoutes.administrationService.host }}", "Destinations": {
"Port": "{{ .Values.reRoutes.administrationService.port }}", "destination1": {
} "Address": "{{ .Values.reRoutes.identityService.url }}"
], }
"UpstreamPathTemplate": "/api/feature-management/{everything}", }
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] },
}, "administration-cluster": {
{ "Destinations": {
"ServiceKey": "Administration Service", "destination1": {
"DownstreamPathTemplate": "/api/permission-management/{everything}", "Address": "{{ .Values.reRoutes.administrationService.url }}"
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}", }
"DownstreamHostAndPorts": [ }
{ },
"Host": "{{ .Values.reRoutes.administrationService.host }}", "feature-management-cluster": {
"Port": "{{ .Values.reRoutes.administrationService.port }}", "Destinations": {
} "destination1": {
], "Address": "{{ .Values.reRoutes.administrationService.url }}"
"UpstreamPathTemplate": "/api/permission-management/{everything}", }
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }
}, },
{ "permission-management-cluster": {
"ServiceKey": "Administration Service", "Destinations": {
"DownstreamPathTemplate": "/api/setting-management/{everything}", "destination1": {
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}", "Address": "{{ .Values.reRoutes.administrationService.url }}"
"DownstreamHostAndPorts": [ }
{ }
"Host": "{{ .Values.reRoutes.administrationService.host }}", },
"Port": "{{ .Values.reRoutes.administrationService.port }}", "setting-management-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.administrationService.url }}"
}
}
} }
], }
"UpstreamPathTemplate": "/api/setting-management/{everything}", }
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
}]
} }

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

@ -22,8 +22,8 @@ spec:
containerPort: 443 containerPort: 443
volumeMounts: volumeMounts:
- name: config-volume - name: config-volume
mountPath: /app/ocelot.json mountPath: /app/yarp.json
subPath: ocelot.json subPath: yarp.json
env: env:
- name: App__SelfUrl - name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}" value: "{{ .Values.config.selfUrl }}"

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

@ -14,17 +14,11 @@ config:
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8 stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
reRoutes: reRoutes:
accountService: accountService:
schema: http url: http://eshop-st-authserver
host: eshop-st-authserver
port: 80
identityService: identityService:
schema: http url: http://eshop-st-identity
host: eshop-st-identity
port: 80
administrationService: administrationService:
schema: http url: http://eshop-st-administration
host: eshop-st-administration
port: 80
ingress: ingress:
host: # eshop-st-gateway-web host: # eshop-st-gateway-web
tlsSecret: eshop-demo-tls tlsSecret: eshop-demo-tls

Loading…
Cancel
Save