forked from pittar/gitlab-ce-openshift
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitlab-postgresql-dc.yaml
110 lines (110 loc) · 2.97 KB
/
gitlab-postgresql-dc.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: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: gitlab-ce
name: gitlab-ce-postgresql
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
app: gitlab-ce
deploymentconfig: gitlab-ce-postgresql
strategy:
activeDeadlineSeconds: 21600
recreateParams:
post:
execNewPod:
command:
- /usr/bin/scl
- enable
- rh-postgresql10
- export PGPASSWORD='rBXr04eCWqBTI3UI'; psql -h 'gitlab-ce-postgresql' -U
postgres -d gitlabhq_production -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm;'
containerName: gitlab-ce-postgresql
env:
- name: HOME
value: /var/lib/pgsql
- name: PGDATA
value: /var/lib/pgsql/data/userdata
- name: CONTAINER_SCRIPTS_PATH
value: /usr/share/container-scripts/postgresql
failurePolicy: Abort
timeoutSeconds: 600
resources: {}
type: Recreate
template:
metadata:
labels:
app: gitlab-ce
deploymentconfig: gitlab-ce-postgresql
spec:
containers:
- env:
- name: POSTGRESQL_USER
value: userYPQ
- name: POSTGRESQL_PASSWORD
value: i6Typpogyhg81VQc
- name: POSTGRESQL_DATABASE
value: gitlabhq_production
- name: POSTGRESQL_ADMIN_PASSWORD
value: rBXr04eCWqBTI3UI
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 5432
timeoutSeconds: 1
name: gitlab-ce-postgresql
ports:
- containerPort: 5432
protocol: TCP
readinessProbe:
exec:
command:
- /bin/sh
- -i
- -c
- psql -h 127.0.0.1 -U $POSTGRESQL_USER -q -d $POSTGRESQL_DATABASE -c
'SELECT 1'
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 300m
memory: 300Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/pgsql/data
name: gitlab-ce-volume-3
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- name: gitlab-ce-volume-3
persistentVolumeClaim:
claimName: gitlab-ce-postgresql
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- gitlab-ce-postgresql
from:
kind: ImageStreamTag
name: postgresql:10
namespace: openshift
type: ImageChange