Skip to content

Commit dc2e7c2

Browse files
committed
updated charts for local k8s deployment
1 parent 9367c32 commit dc2e7c2

9 files changed

Lines changed: 40 additions & 8 deletions

File tree

k8s/helm/app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ app: # app global settings
2525
webhooks: webhooks-api # ingress entry for webhooks api
2626
webhooksweb: webhooks-web # ingress entry for webhooks web demo client
2727
svc:
28-
basket: basket-apo # service name for basket api
28+
basket: basket-api # service name for basket api
2929
catalog: catalog-api # service name for catalog api
3030
ordering: ordering-api # service name for ordering api
3131
orderingbackgroundtasks: ordering-backgroundtasks # service name for orderingbackgroundtasks

k8s/helm/basket-api/templates/configmap.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{{- $name := include "basket-api.fullname" . -}}
2-
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
32

43
apiVersion: v1
54
kind: ConfigMap
@@ -12,7 +11,7 @@ metadata:
1211
heritage: {{ .Release.Service }}
1312
data:
1413
basket__ConnectionString: {{ .Values.inf.redis.basket.constr }}
15-
urls__IdentityUrl: http://{{ $identity }}
14+
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
1615
basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
1716
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
1817
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"

k8s/helm/mobileshoppingagg/templates/configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ data:
2424
internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc
2525
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
2626
internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc
27+
internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}"
28+
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
29+
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"

k8s/helm/mobileshoppingagg/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ image:
1010
service:
1111
type: ClusterIP
1212
port: 80
13+
grpcPort: 81
1314

1415
ingress:
1516
enabled: false
@@ -54,6 +55,12 @@ env:
5455
key: internalurls__payment__hc
5556
- name: LocationUrlHC
5657
key: internalurls__location__hc
58+
- name: urls__grpcBasket
59+
key: internalurls__grpcBasket
60+
- name: urls__grpcCatalog
61+
key: internalurls__grpcCatalog
62+
- name: urls__grpcOrdering
63+
key: internalurls__grpcOrdering
5764
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
5865
values:
5966
- name: ASPNETCORE_ENVIRONMENT

k8s/helm/ordering-api/templates/configmap.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{{- $name := include "ordering-api.fullname" . -}}
22
{{- $sqlsrv := include "sql-name" . -}}
3-
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
43

54
apiVersion: v1
65
kind: ConfigMap
@@ -14,7 +13,7 @@ metadata:
1413
data:
1514
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
1615
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
17-
urls__IdentityUrl: http://{{ $identity }}
16+
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
1817
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
1918
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
2019
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"

k8s/helm/webshoppingagg/templates/configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ data:
2424
internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc
2525
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
2626
internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc
27+
internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}"
28+
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
29+
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"

k8s/helm/webshoppingagg/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ image:
1010
service:
1111
type: ClusterIP
1212
port: 80
13+
grpcPort: 81
1314

1415
ingress:
1516
enabled: false
@@ -54,6 +55,13 @@ env:
5455
key: internalurls__payment__hc
5556
- name: LocationUrlHC
5657
key: internalurls__location__hc
58+
- name: urls__grpcBasket
59+
key: internalurls__grpcBasket
60+
- name: urls__grpcCatalog
61+
key: internalurls__grpcCatalog
62+
- name: urls__grpcOrdering
63+
key: internalurls__grpcOrdering
64+
5765
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
5866
values:
5967
- name: ASPNETCORE_ENVIRONMENT

src/Web/WebMVC/Services/BasketService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ public BasketService(HttpClient httpClient, IOptions<AppSettings> settings, ILog
3434
public async Task<Basket> GetBasket(ApplicationUser user)
3535
{
3636
var uri = API.Basket.GetBasket(_basketByPassUrl, user.Id);
37-
38-
var responseString = await _apiClient.GetStringAsync(uri);
39-
37+
_logger.LogDebug($"[GetBasket] -> Calling {uri} to get the basket");
38+
var response = await _apiClient.GetAsync(uri);
39+
_logger.LogDebug($"[GetBasket] -> response code {response.StatusCode}");
40+
var responseString = await response.Content.ReadAsStringAsync();
4041
return string.IsNullOrEmpty(responseString) ?
4142
new Basket() { BuyerId = user.Id } :
4243
JsonConvert.DeserializeObject<Basket>(responseString);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Debug"
5+
}
6+
},
7+
"Serilog": {
8+
"MinimumLevel": {
9+
"Default": "Debug"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)