forked from ContainerSolutions/k8s-deployment-strategies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-v1.yaml
93 lines (93 loc) · 1.86 KB
/
app-v1.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
apiVersion: v1
kind: Namespace
metadata:
name: ns-ramped
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: ns-ramped
name: deployment-my-app
labels:
app: my-app
spec:
replicas: 10
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
version: v1.0.0
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9101"
prometheus.io/path: "/metrics"
prometheus.io/scheme: "http"
spec:
terminationGracePeriodSeconds: 100
containers:
- name: my-app
image: containersol/k8s-deployment-strategies
ports:
- name: http
containerPort: 8080
- name: probe
containerPort: 8086
env:
- name: VERSION
value: v1.0.0
livenessProbe:
httpGet:
path: /live
port: probe
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: probe
periodSeconds: 5
lifecycle:
preStop:
exec:
command: ["sleep","90"]
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: ns-ramped
name: ingress-ramped
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/connection-draining: "true"
appgw.ingress.kubernetes.io/connection-draining-timeout: "30"
spec:
rules:
- http:
paths:
- path: /
pathType: Exact
backend:
service:
name: svc-my-app
port:
number: 80
---
apiVersion: v1
kind: Service
metadata:
namespace: ns-ramped
name: svc-my-app
labels:
app: my-app
spec:
type: ClusterIP
ports:
- name: http
port: 80
targetPort: http
selector:
app: my-app