-
Notifications
You must be signed in to change notification settings - Fork 14
/
openshift-template.yml
149 lines (143 loc) · 3.29 KB
/
openshift-template.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
---
# PV configuration commented out (see below)
apiVersion: v1
kind: Template
metadata:
name: test
objects:
- apiVersion: v1
kind: Service
metadata:
labels:
app: aerogear-app-metrics
service: aerogear-app-metrics
name: aerogear-app-metrics
spec:
ports:
- name: web
port: 443
targetPort: 3000
selector:
app: aerogear-app-metrics
service: aerogear-app-metrics
- apiVersion: v1
kind: Service
metadata:
labels:
app: postgres
app: aerogear-app-metrics
name: postgres-internal
spec:
ports:
- name: 5432-tcp
port: 5432
targetPort: 5432
selector:
app: postgres
service: aerogear-app-metrics
- apiVersion: v1
kind: Route
metadata:
labels:
app: aerogear-app-metrics
service: aerogear-app-metrics
name: aerogear-app-metrics
spec:
port:
targetPort: web
to:
kind: Service
name: aerogear-app-metrics
tls:
insecureEdgeTerminationPolicy: Redirect
termination: edge
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: aerogear-app-metrics
service: aerogear-app-metrics
name: aerogear-app-metrics
spec:
replicas: 1
selector:
app: aerogear-app-metrics
service: aerogear-app-metrics
template:
metadata:
labels:
app: aerogear-app-metrics
service: aerogear-app-metrics
spec:
containers:
- env:
- name: PGHOST
value: postgres-internal
- name: PGUSER
value: postgresql
- name: PGPASSWORD
value: postgres
- name: PGDATABASE
value: aerogear_mobile_metrics
image: docker.io/aerogear/aerogear-app-metrics:master
imagePullPolicy: Always
name: aerogear-app-metrics
ports:
- containerPort: 3000
readinessProbe:
httpGet:
path: healthz
port: 3000
initialDelaySeconds: 15
timeoutSeconds: 1
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: postgres
service: aerogear-app-metrics
name: postgres
spec:
replicas: 1
selector:
app: postgres
service: aerogear-app-metrics
template:
metadata:
labels:
app: postgres
service: aerogear-app-metrics
spec:
containers:
- env:
- name: POSTGRESQL_DATABASE
value: aerogear_mobile_metrics
- name: POSTGRESQL_PASSWORD
value: postgres
- name: POSTGRESQL_USER
value: postgresql
image: registry.access.redhat.com/rhscl/postgresql-96-rhel7
imagePullPolicy: IfNotPresent
name: postgresql
ports:
- containerPort: 5432
# volumeMounts:
# - mountPath: /var/lib/pgsql/data
# name: postgres-volume
# volumes:
# - name: postgres-volume
# persistentVolumeClaim:
# claimName: postgres-pvc
#- apiVersion: v1
# kind: PersistentVolumeClaim
# metadata:
# name: postgres-pvc
# labels:
# app: aerogear-app-metrics
# service: aerogear-app-metrics
# spec:
# accessModes:
# - ReadWriteMany
# resources:
# requests:
# storage: 10Gi