-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
69 lines (65 loc) · 1.74 KB
/
deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: shop-api
spec:
selector:
matchLabels:
app: shop-api
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template: # template for the pods
metadata:
name: shop-api
labels:
app: shop-api
spec:
containers:
- name: shop-api
env:
# it should be "ConnectionStrings:DefaultConnection"
# For .Net Core, the current (ugly) workaround is to use double underscores
# https://github.com/kubernetes/kubernetes/issues/53201
- name: ConnectionStrings__DefaultConnection
valueFrom:
secretKeyRef:
name: user-pass
key: store-connectionstring
- name: ConnectionStrings__IdentityConnection
valueFrom:
secretKeyRef:
name: user-pass
key: identity-connectionstring
image: shop-api
# pull image from remote server ?
imagePullPolicy: Never
readinessProbe:
httpGet:
path: /WeatherForecast
port: 5000
livenessProbe:
httpGet:
path: /WeatherForecast
port: 5000
---
apiVersion: v1
kind: Service
metadata:
name: shop-api
spec:
# This defines which pods are going to be represented by this Service
# The service becomes a network endpoint for either other services
# or maybe external users to connect to (eg browser)
# minikube start --extra-config=apiserver.service-node-port-range=80-30000,
# port 80 can be used as well
selector:
app: shop-api
ports:
- name: http
port: 5000
targetPort: 5000
type: ClusterIP