Skip to content

Commit 18ac5e5

Browse files
committed
feat: Add environment variable support for AI service and company name in deployments
1 parent 5b739df commit 18ac5e5

File tree

7 files changed

+28
-3
lines changed

7 files changed

+28
-3
lines changed

azure.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ services:
5151
dir: ../../kustomize/overlays/azd/product-service
5252
edits:
5353
- set image product-service=${SERVICE_PRODUCT_SERVICE_IMAGE_NAME}
54+
env:
55+
AI_SERVICE_URL: "http://ai-service:5001/"
56+
COMPANY_NAME: ${COMPANY_NAME}
5457
hooks:
5558
postdeploy:
5659
posix:
@@ -141,6 +144,8 @@ services:
141144
dir: ../../kustomize/overlays/azd/store-front
142145
edits:
143146
- set image store-front=${SERVICE_STORE_FRONT_IMAGE_NAME}
147+
env:
148+
COMPANY_NAME: ${COMPANY_NAME}
144149
hooks:
145150
postdeploy:
146151
posix:
@@ -166,6 +171,8 @@ services:
166171
dir: ../../kustomize/overlays/azd/store-admin
167172
edits:
168173
- set image store-admin=${SERVICE_STORE_ADMIN_IMAGE_NAME}
174+
env:
175+
COMPANY_NAME: ${COMPANY_NAME}
169176
hooks:
170177
postdeploy:
171178
posix:

kustomize/overlays/azd/product-service/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ spec:
1919
image: product-service:latest
2020
ports:
2121
- containerPort: 3002
22-
env:
23-
- name: AI_SERVICE_URL
24-
value: "http://ai-service:5001/"
22+
envFrom:
23+
- configMapRef:
24+
name: product-service
2525
resources:
2626
requests:
2727
cpu: 1m

kustomize/overlays/azd/product-service/kustomization.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ kind: Kustomization
33
resources:
44
- deployment.yaml
55
- service.yaml
6+
configMapGenerator:
7+
- envs:
8+
- .env
9+
name: product-service

kustomize/overlays/azd/store-admin/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ spec:
2020
ports:
2121
- containerPort: 8081
2222
name: store-admin # container images hosted on ghcr.io and will be removed in future releases
23+
envFrom:
24+
- configMapRef:
25+
name: store-admin
2326
resources:
2427
requests:
2528
cpu: 1m

kustomize/overlays/azd/store-admin/kustomization.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ kind: Kustomization
33
resources:
44
- deployment.yaml
55
- service.yaml
6+
configMapGenerator:
7+
- envs:
8+
- .env
9+
name: store-admin

kustomize/overlays/azd/store-front/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ spec:
2020
ports:
2121
- containerPort: 8080
2222
name: store-front
23+
envFrom:
24+
- configMapRef:
25+
name: store-front
2326
resources:
2427
requests:
2528
cpu: 1m

kustomize/overlays/azd/store-front/kustomization.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ kind: Kustomization
33
resources:
44
- deployment.yaml
55
- service.yaml
6+
configMapGenerator:
7+
- envs:
8+
- .env
9+
name: store-front

0 commit comments

Comments
 (0)