-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathgogs.yaml
203 lines (203 loc) · 4.26 KB
/
gogs.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gogs-postgresql
annotations:
image.openshift.io/triggers: >-
[{"from":{"kind":"ImageStreamTag","name":"postgresql:latest", "namespace":"openshift"},"fieldPath":"spec.template.spec.containers[?(@.name==\"postgresql\")].image"}]
labels:
app: gogs
app.kubernetes.io/component: database
app.kubernetes.io/instance: gogs
app.kubernetes.io/name: gogs-postgresql
app.kubernetes.io/part-of: gogs
spec:
replicas: 1
selector:
matchLabels:
app: gogs
name: gogs-postgresql
template:
metadata:
labels:
app: gogs
name: gogs-postgresql
spec:
containers:
- name: postgresql
imagePullPolicy: Always
image: postgresql:latest
env:
- name: POSTGRESQL_USER
value: gogs
- name: POSTGRESQL_PASSWORD
value: gogs
- name: POSTGRESQL_DATABASE
value: gogs
- name: POSTGRESQL_MAX_CONNECTIONS
value: "100"
- name: POSTGRESQL_SHARED_BUFFERS
value: 12MB
- name: POSTGRESQL_ADMIN_PASSWORD
value: gogs
ports:
- containerPort: 5432
livenessProbe:
initialDelaySeconds: 30
tcpSocket:
port: 5432
timeoutSeconds: 1
failureThreshold: 10
periodSeconds: 20
readinessProbe:
exec:
command:
- /bin/sh
- -i
- -c
- psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1'
resources:
limits:
memory: 512Mi
volumeMounts:
- mountPath: /var/lib/pgsql/data
name: gogs-postgres-data
volumes:
- name: gogs-postgres-data
persistentVolumeClaim:
claimName: gogs-postgres-data
---
kind: Service
apiVersion: v1
metadata:
name: gogs-postgresql
labels:
app: gogs
spec:
ports:
- name: postgresql
port: 5432
targetPort: 5432
selector:
name: gogs-postgresql
app: gogs
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gogs
labels:
app: gogs
app.kubernetes.io/component: gogs
app.kubernetes.io/instance: gogs
app.kubernetes.io/name: gogs
app.kubernetes.io/part-of: gogs
spec:
replicas: 1
selector:
matchLabels:
app: gogs
name: gogs
template:
metadata:
labels:
app: gogs
name: gogs
spec:
containers:
- name: gogs
imagePullPolicy: Always
image: quay.io/siamaksade/gogs:stable
ports:
- containerPort: 3000
protocol: TCP
volumeMounts:
- name: gogs-data
mountPath: /opt/gogs/data
- name: gogs-config
mountPath: /etc/gogs/conf
readinessProbe:
httpGet:
path: /
port: 3000
scheme: HTTP
initialDelaySeconds: 40
timeoutSeconds: 1
periodSeconds: 20
successThreshold: 1
failureThreshold: 10
livenessProbe:
httpGet:
path: /
port: 3000
scheme: HTTP
initialDelaySeconds: 40
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 10
volumes:
- name: gogs-data
persistentVolumeClaim:
claimName: gogs-data
- name: gogs-config
configMap:
name: gogs-config
items:
- key: app.ini
path: app.ini
---
kind: Service
apiVersion: v1
metadata:
labels:
app: gogs
name: gogs
spec:
ports:
- name: 3000-tcp
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: gogs
name: gogs
type: ClusterIP
---
kind: Route
apiVersion: v1
id: gogs-http
metadata:
labels:
app: gogs
name: gogs
spec:
to:
name: gogs
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: gogs-data
labels:
app: gogs
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: gogs-postgres-data
labels:
app: gogs
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi