-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathsentiment.yaml
63 lines (54 loc) · 1.28 KB
/
sentiment.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
#
# Deploy Azure Cognitive Service Text Analytics (Sentiment Analysis) as a container
#
# ------------------- Deployment ------------------- #
kind: Deployment
apiVersion: apps/v1
metadata:
name: sentiment
labels:
app: sentiment
spec:
replicas: 1
selector:
matchLabels:
app: sentiment
template:
metadata:
labels:
app: sentiment
spec:
containers:
- name: sentiment-pods
image: mcr.microsoft.com/azure-cognitive-services/sentiment:1.1.009301-amd64-preview
imagePullPolicy: IfNotPresent
env:
- name: Eula
value: accept
- name: Billing
value: https://changemeRegion.api.cognitive.microsoft.com/text/analytics/v2.1
- name: ApiKey
valueFrom:
secretKeyRef:
name: smilr-secrets
key: sentiment-key
ports:
- containerPort: 5000
resources:
limits:
memory: "2G" # Wow! Anything less and the pod won't start
cpu: "0.25"
---
# ------------------- Internal Cluster IP ------------------- #
kind: Service
apiVersion: v1
metadata:
name: sentiment
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 5000
targetPort: 5000
selector:
app: sentiment