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: 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": "Account Service", "Path": "/api/account/{**everything}"
"DownstreamPathTemplate": "/api/account/{everything}", }
"DownstreamScheme": "{{ .Values.reRoutes.accountService.schema }}", },
"DownstreamHostAndPorts": [ "Administration Service": {
{ "ClusterId": "administration-cluster",
"Host": "{{ .Values.reRoutes.accountService.host }}", "Match": {
"Port": {{ .Values.reRoutes.accountService.port }} "Path": "/api/abp/{**everything}"
} }
], },
"UpstreamPathTemplate": "/api/account/{everything}", "Catalog Service": {
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "ClusterId": "catalog-cluster",
}, "Match": {
{ "Path": "/api/catalog/{**everything}"
"ServiceKey": "Administration Service", }
"DownstreamPathTemplate": "/api/abp/{everything}", },
"DownstreamScheme": "{{ .Values.reRoutes.administrationService.schema }}", "Basket Service": {
"DownstreamHostAndPorts": [ "ClusterId": "basket-cluster",
{ "Match": {
"Host": "{{ .Values.reRoutes.administrationService.host }}", "Path": "/api/basket/{**everything}"
"Port": "{{ .Values.reRoutes.administrationService.port }}", }
} },
], "Ordering Service": {
"UpstreamPathTemplate": "/api/abp/{everything}", "ClusterId": "ordering-cluster",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "Match": {
}, "Path": "/api/ordering/{**everything}"
{ }
"ServiceKey": "Catalog Service", },
"DownstreamPathTemplate": "/api/catalog/{everything}", "Payment Service": {
"DownstreamScheme": "{{ .Values.reRoutes.catalogService.schema }}", "ClusterId": "payment-cluster",
"DownstreamHostAndPorts": [ "Match": {
{ "Path": "/api/payment/{**everything}"
"Host": "{{ .Values.reRoutes.catalogService.host }}", }
"Port": "{{ .Values.reRoutes.catalogService.port }}", },
} "product-picture-route": {
], "ClusterId": "product-picture-cluster",
"UpstreamPathTemplate": "/api/c/catalog/{everything}", "Match": {
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "Path": "/product-images/{**everything}",
}, "Methods" : [ "GET" ]
{ }
"ServiceKey": "Basket Service",
"DownstreamPathTemplate": "/api/basket/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.basketService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.basketService.host }}",
"Port": "{{ .Values.reRoutes.basketService.port }}",
} }
], },
"UpstreamPathTemplate": "/api/basket/{everything}", "Clusters": {
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] "account-cluster": {
}, "Destinations": {
{ "destination1": {
"ServiceKey": "Ordering Service", "Address": "{{ .Values.reRoutes.accountService.url }}"
"DownstreamPathTemplate": "/api/ordering/{everything}", }
"DownstreamScheme": "{{ .Values.reRoutes.orderingService.schema }}", }
"DownstreamHostAndPorts": [ },
{ "administration-cluster": {
"Host": "{{ .Values.reRoutes.orderingService.host }}", "Destinations": {
"Port": "{{ .Values.reRoutes.orderingService.port }}", "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 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 }}"

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

@ -14,29 +14,19 @@ config:
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
catalogService: catalogService:
schema: http url: http://eshop-st-catalog
host: eshop-st-catalog
port: 80
basketService: basketService:
schema: http url: http://eshop-st-basket
host: eshop-st-basket
port: 80
orderingService: orderingService:
schema: http url: http://eshop-st-ordering
host: eshop-st-ordering paymentService:
port: 80 url: http://eshop-st-payment
ingress: ingress:
host: eshop-st-gateway-web-public 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: 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

36
etc/k8s/eshoponabp/values.yaml

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

Loading…
Cancel
Save