-
Notifications
You must be signed in to change notification settings - Fork 1
/
news-deployment.yaml
87 lines (87 loc) · 1.9 KB
/
news-deployment.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
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: news
namespace: netpf
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: news
tier: backend
strategy:
type: Recreate
template:
metadata:
labels:
app: news
type: api
tier: backend
spec:
containers:
- name: news
image: sipf/news-ws:latest
env:
- name: SPRING_DATASOURCE_URL
value: jdbc:postgresql://news-db/news
- name: SPRING_DATASOURCE_USERNAME
value: news
- name: SPRING_DATASOURCE_PASSWORD
value: news
- name: SPRING_PROFILES_ACTIVE
value: test
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 8080
livenessProbe:
httpGet:
scheme: HTTP
path: /health
port: 8080
httpHeaders:
- name: Authorization
value: Basic YWRtaW46cGFzc3dvcmQ=
initialDelaySeconds: 30
timeoutSeconds: 30
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: news-db
namespace: netpf
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: news
tier: postgres
strategy:
type: Recreate
template:
metadata:
labels:
app: news
type: database
tier: postgres
spec:
containers:
- name: database
image: postgres:9.5
env:
- name: POSTGRES_DB
value: news
- name: POSTGRES_USER
value: news
- name: POSTGRES_PASSWORD
value: news
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 5432