Browse Source

Merge pull request #103 from abpframework/gterdem/helm_yarp_update

Helm Yarp configuration update
pull/105/head
Galip Tolga Erdem 5 years ago
committed by GitHub
parent
commit
664744f285
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 165
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-configmap.yaml
  2. 4
      etc/k8s/eshoponabp/charts/gateway-web-public/templates/gateway-web-public-deployment.yaml
  3. 26
      etc/k8s/eshoponabp/charts/gateway-web-public/values.yaml
  4. 164
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml
  5. 4
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-deployment.yaml
  6. 12
      etc/k8s/eshoponabp/charts/gateway-web/values.yaml
  7. 36
      etc/k8s/eshoponabp/values.yaml

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

@ -3,75 +3,104 @@ kind: ConfigMap
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap
data:
ocelot.json: |-
yarp.json: |-
{
"GlobalConfiguration": {
"BaseUrl": "{{ .Values.config.globalConfigurationBaseUrl }}"
},
"Routes": [
{
"ServiceKey": "Account Service",
"DownstreamPathTemplate": "/api/account/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.accountService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.accountService.host }}",
"Port": {{ .Values.reRoutes.accountService.port }}
}
],
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.administrationService.host }}",
"Port": "{{ .Values.reRoutes.administrationService.port }}",
}
],
"UpstreamPathTemplate": "/api/abp/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Catalog Service",
"DownstreamPathTemplate": "/api/catalog/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.catalogService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.catalogService.host }}",
"Port": "{{ .Values.reRoutes.catalogService.port }}",
}
],
"UpstreamPathTemplate": "/api/c/catalog/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Basket Service",
"DownstreamPathTemplate": "/api/basket/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.basketService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.basketService.host }}",
"Port": "{{ .Values.reRoutes.basketService.port }}",
"ReverseProxy": {
"Routes": {
"Account Service": {
"ClusterId": "account-cluster",
"Match": {
"Path": "/api/account/{**everything}"
}
},
"Administration Service": {
"ClusterId": "administration-cluster",
"Match": {
"Path": "/api/abp/{**everything}"
}
},
"Catalog Service": {
"ClusterId": "catalog-cluster",
"Match": {
"Path": "/api/catalog/{**everything}"
}
},
"Basket Service": {
"ClusterId": "basket-cluster",
"Match": {
"Path": "/api/basket/{**everything}"
}
},
"Ordering Service": {
"ClusterId": "ordering-cluster",
"Match": {
"Path": "/api/ordering/{**everything}"
}
},
"Payment Service": {
"ClusterId": "payment-cluster",
"Match": {
"Path": "/api/payment/{**everything}"
}
},
"product-picture-route": {
"ClusterId": "product-picture-cluster",
"Match": {
"Path": "/product-images/{**everything}",
"Methods" : [ "GET" ]
}
}
],
"UpstreamPathTemplate": "/api/basket/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Ordering Service",
"DownstreamPathTemplate": "/api/ordering/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.orderingService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.orderingService.host }}",
"Port": "{{ .Values.reRoutes.orderingService.port }}",
},
"Clusters": {
"account-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.accountService.url }}"
}
}
},
"administration-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.administrationService.url }}"
}
}
},
"catalog-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.catalogService.url }}"
}
}
},
"product-picture-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.catalogService.url }}"
}
}
},
"basket-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.basketService.url }}"
}
}
},
"ordering-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.orderingService.url }}"
}
}
},
"payment-cluster": {
"Destinations": {
"destination1": {
"Address": "{{ .Values.reRoutes.paymentService.url }}"
}
}
}
],
"UpstreamPathTemplate": "/api/ordering/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
}]
}
}
}

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

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

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

@ -14,29 +14,19 @@ config:
reRoutes:
accountService:
schema: http
host: eshop-st-authserver
port: 80
url: http://eshop-st-authserver
identityService:
schema: http
host: eshop-st-identity
port: 80
url: http://eshop-st-identity
administrationService:
schema: http
host: eshop-st-administration
port: 80
url: http://eshop-st-administration
catalogService:
schema: http
host: eshop-st-catalog
port: 80
url: http://eshop-st-catalog
basketService:
schema: http
host: eshop-st-basket
port: 80
url: http://eshop-st-basket
orderingService:
schema: http
host: eshop-st-ordering
port: 80
url: http://eshop-st-ordering
paymentService:
url: http://eshop-st-payment
ingress:
host: eshop-st-gateway-web-public

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

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

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

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

36
etc/k8s/eshoponabp/values.yaml

@ -130,14 +130,12 @@ gateway-web:
repository: "eshoponabp/gateway-web"
tag: latest
reRoutes:
accountService:
url: http://eshop-st-authserver
identityService:
schema: http
host: eshop-st-identity
port: 80
url: http://eshop-st-identity
administrationService:
schema: http
host: eshop-st-administration
port: 80
url: http://eshop-st-administration
# gateway-web-public sub-chart override
gateway-web-public:
@ -161,29 +159,19 @@ gateway-web-public:
tag: latest
reRoutes:
accountService:
schema: http
host: eshop-st-authserver
port: 80
url: http://eshop-st-authserver
identityService:
schema: http
host: eshop-st-identity
port: 80
url: http://eshop-st-identity
administrationService:
schema: http
host: eshop-st-administration
port: 80
url: http://eshop-st-administration
catalogService:
schema: http
host: eshop-st-catalog
port: 80
url: http://eshop-st-catalog
basketService:
schema: http
host: eshop-st-basket
port: 80
url: http://eshop-st-basket
orderingService:
schema: http
host: eshop-st-ordering
port: 80
url: http://eshop-st-ordering
paymentService:
url: http://eshop-st-payment
# basket-service sub-chart override
basket:

Loading…
Cancel
Save