forked from Azure-Samples/aks-store-demo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ai-service.yaml
73 lines (73 loc) · 1.72 KB
/
ai-service.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
apiVersion: apps/v1
kind: Deployment
metadata:
name: ai-service
spec:
replicas: 1
selector:
matchLabels:
app: ai-service
template:
metadata:
labels:
app: ai-service
spec:
nodeSelector:
"kubernetes.io/os": linux
containers:
- name: order-service
image: ghcr.io/azure-samples/aks-store-demo/ai-service:latest
ports:
- containerPort: 5001
env:
- name: USE_AZURE_OPENAI # set to True for Azure OpenAI, False for Public OpenAI
value: ""
- name: AZURE_OPENAI_DEPLOYMENT_NAME # required if using Azure OpenAI
value: ""
- name: AZURE_OPENAI_ENDPOINT # required if using Azure OpenAI
value: ""
- name: OPENAI_API_KEY # always required
value: ""
- name: OPENAI_ORG_ID # required if using Public OpenAI
value: ""
resources:
requests:
cpu: 20m
memory: 50Mi
limits:
cpu: 30m
memory: 85Mi
startupProbe:
httpGet:
path: /health
port: 5001
initialDelaySeconds: 60
failureThreshold: 3
periodSeconds: 5
readinessProbe:
httpGet:
path: /health
port: 5001
initialDelaySeconds: 3
failureThreshold: 3
periodSeconds: 5
livenessProbe:
httpGet:
path: /health
port: 5001
initialDelaySeconds: 3
failureThreshold: 5
periodSeconds: 3
---
apiVersion: v1
kind: Service
metadata:
name: ai-service
spec:
type: ClusterIP
ports:
- name: http
port: 5001
targetPort: 5001
selector:
app: ai-service