-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapidemo.manifest.yml
66 lines (66 loc) · 1.41 KB
/
apidemo.manifest.yml
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
apiVersion: v1
kind: Service
metadata:
name: go-api-demo
namespace: playground
labels:
app: go-api-demo
environment: development
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
type: NodePort
externalTrafficPolicy: Local
ports:
- protocol: TCP
name: api
port: 10000
targetPort: 10000
selector:
app: go-api-demo
environment: development
sessionAffinity: None
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: playground
labels:
app: go-api-demo
environment: development
name: go-api-demo
spec:
replicas: 1
selector:
matchLabels:
app: go-api-demo
environment: development
template:
metadata:
labels:
app: go-api-demo
environment: development
spec:
containers:
- image: cjlapao/go-restapi-demo:latest
imagePullPolicy: Always
name: go-api-demo
resources:
requests: {
cpu: "150m",
memory: "25Mi"
}
limits: {
cpu: "250m",
memory: "50Mi"
}
ports:
- containerPort: 10000
env:
- name: "mongoConnectionString_TEMP"
valueFrom:
secretKeyRef:
name: azure-secrets
key: mongodbConnectionstring
dnsPolicy: ClusterFirstWithHostNet
restartPolicy: Always