Skip to content

Commit 6cabf66

Browse files
committed
update k8s configuration
- add event bus - remove ASPNETCORE_ENVIRONMENT = Development (apps will default to Production)
1 parent 1eae6a9 commit 6cabf66

2 files changed

Lines changed: 36 additions & 12 deletions

File tree

k8s/deployments.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ spec:
1515
image: eshop/basket.api
1616
imagePullPolicy: Always
1717
env:
18-
- name: ASPNETCORE_ENVIRONMENT
19-
value: Development
2018
- name: ASPNETCORE_URLS
2119
value: http://0.0.0.0:80/basket-api
2220
- name: ConnectionString
2321
value: 127.0.0.1
22+
- name: EventBusConnection
23+
value: rabbitmq
2424
- name: IdentityUrl
2525
valueFrom:
2626
configMapKeyRef:
@@ -52,12 +52,12 @@ spec:
5252
image: eshop/catalog.api
5353
imagePullPolicy: Always
5454
env:
55-
- name: ASPNETCORE_ENVIRONMENT
56-
value: Development
5755
- name: ASPNETCORE_URLS
5856
value: http://0.0.0.0:80/catalog-api
5957
- name: ConnectionString
6058
value: "Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word"
59+
- name: EventBusConnection
60+
value: rabbitmq
6161
- name: ExternalCatalogBaseUrl
6262
valueFrom:
6363
configMapKeyRef:
@@ -85,8 +85,6 @@ spec:
8585
image: eshop/identity.api
8686
imagePullPolicy: Always
8787
env:
88-
- name: ASPNETCORE_ENVIRONMENT
89-
value: Development
9088
- name: ASPNETCORE_URLS
9189
value: http://0.0.0.0:80/identity
9290
- name: ConnectionStrings__DefaultConnection
@@ -123,12 +121,12 @@ spec:
123121
image: eshop/ordering.api
124122
imagePullPolicy: Always
125123
env:
126-
- name: ASPNETCORE_ENVIRONMENT
127-
value: Development
128124
- name: ASPNETCORE_URLS
129125
value: http://0.0.0.0:80/ordering-api
130126
- name: ConnectionString
131127
value: "Server=sql-data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;"
128+
- name: EventBusConnection
129+
value: rabbitmq
132130
- name: IdentityUrl
133131
valueFrom:
134132
configMapKeyRef:
@@ -156,8 +154,6 @@ spec:
156154
image: eshop/webmvc
157155
imagePullPolicy: Always
158156
env:
159-
- name: ASPNETCORE_ENVIRONMENT
160-
value: Development
161157
- name: ASPNETCORE_URLS
162158
value: http://0.0.0.0:80/webmvc
163159
- name: BasketUrl
@@ -207,8 +203,6 @@ spec:
207203
image: eshop/webspa
208204
imagePullPolicy: Always
209205
env:
210-
- name: ASPNETCORE_ENVIRONMENT
211-
value: Development
212206
- name: ASPNETCORE_URLS
213207
value: http://0.0.0.0:80
214208
- name: BasketUrl

k8s/rabbitmq.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
app: eshop
6+
component: rabbitmq
7+
name: rabbitmq
8+
spec:
9+
ports:
10+
- port: 5672
11+
selector:
12+
app: eshop
13+
component: rabbitmq
14+
---
15+
apiVersion: extensions/v1beta1
16+
kind: Deployment
17+
metadata:
18+
name: rabbitmq
19+
spec:
20+
template:
21+
metadata:
22+
labels:
23+
app: eshop
24+
component: rabbitmq
25+
spec:
26+
containers:
27+
- name: rabbitmq
28+
image: rabbitmq:3.6.9-alpine
29+
ports:
30+
- containerPort: 5672

0 commit comments

Comments
 (0)