-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcosmos-app.yaml
65 lines (65 loc) · 1.93 KB
/
cosmos-app.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
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: cosmos-todo-app
name: cosmos-todo-app
namespace: cosmos-todo
spec:
replicas: 1
selector:
matchLabels:
app: cosmos-todo-app
template:
metadata:
labels:
app: cosmos-todo-app
spec:
containers:
- name: app
image: mcr.microsoft.com/k8s/asodemos/cosmostodo:latest
env:
- name: CosmosDB__Account
valueFrom:
secretKeyRef:
# This is the secret created by ASO associated with the CosmosDB Account.
name: ${APP_NAME}-sqldb-connection-settings
# See https://azure.github.io/azure-service-operator/reference/documentdb/v1api20210515/#documentdb.azure.com/v1api20210515.DatabaseAccount for more details
key: documentEndpoint
optional: false
- name: CosmosDB__Key
valueFrom:
secretKeyRef:
key: key
# This is the secret created by ASO associated with the CosmosDB Account.
name: ${APP_NAME}-sqldb-connection-settings
# See https://azure.github.io/azure-service-operator/reference/documentdb/v1api20210515/#documentdb.azure.com/v1api20210515.DatabaseAccount for more details
optional: false
- name: CosmosDB__DatabaseName
value: "${APP_NAME}-sql-db"
- name: CosmosDB__ContainerName
value: "${APP_NAME}-sql-container"
ports:
- containerPort: 80
name: webserver
protocol: TCP
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 200m
memory: 256Mi
terminationGracePeriodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: cosmos-todo-service
namespace: cosmos-todo
spec:
ports:
- port: 80
targetPort: 80
selector:
app: cosmos-todo-app