-
Notifications
You must be signed in to change notification settings - Fork 1
/
organism-deployment.yaml
110 lines (109 loc) · 2.48 KB
/
organism-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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#apiVersion: v1
#kind: PersistentVolumeClaim
#metadata:
# name: zipcode-db-pv-claim
# labels:
# app: zipcode
#spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 500Mi
#---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: organism
namespace: netpf
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: organism
tier: backend
strategy:
type: Recreate
template:
metadata:
labels:
app: organism
type: api
tier: backend
spec:
containers:
- name: organism
image: sipf/organism-ws:latest
env:
- name: SPRING_DATASOURCE_URL
value: jdbc:postgresql://organism-db/organism
- name: SPRING_DATASOURCE_USERNAME
value: organism
- name: SPRING_DATASOURCE_PASSWORD
value: organism
- name: SPRING_PROFILES_ACTIVE
value: test
- name: SPRING_APPLICATION_JSON
value: '{"eureka": { "client": { "serviceUrl": { "defaultZone": "http://discovery:8761/eureka/" }}}}'
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: organism-db
namespace: netpf
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: organism
tier: postgres
strategy:
type: Recreate
template:
metadata:
labels:
app: organism
type: database
tier: postgres
spec:
containers:
- name: database
image: postgres:9.5
env:
- name: POSTGRES_DB
value: organism
- name: POSTGRES_USER
value: organism
- name: POSTGRES_PASSWORD
value: organism
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 5432
# volumeMounts:
# - name: zipcode-db-persistent-storage
# mountPath: /var/www/html
# volumes:
# - name: zipcode-db-persistent-storage
# persistentVolumeClaim:
# claimName: organism-db-local-pv