-
Notifications
You must be signed in to change notification settings - Fork 0
/
gogs.yml
119 lines (117 loc) · 2.76 KB
/
gogs.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
---
kind: Service
apiVersion: v1
metadata:
name: gogs-svc
spec:
ports:
- name: gogs-http
protocol: TCP
port: 80
targetPort: gogs-http
- name: gogs-ssh
protocol: TCP
port: 22
targetPort: gogs-ssh
selector:
app: gogs
type: ClusterIP
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: gogs-pv-claim
labels:
app: gogs
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: gogs-depl
labels:
app: gogs
spec:
replicas: 1
strategy:
type: Recreate
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "3000"
prometheus.io/path: "/-/metrics"
labels:
app: gogs
spec:
containers:
- name: gogs
image: gogs/gogs:latest
env:
# https://github.com/gogits/gogs/tree/master/docker#container-options
- name: SOCAT_LINK
value: "false"
livenessProbe:
initialDelaySeconds: 180
httpGet:
path: /
port: gogs-http
ports:
- name: gogs-ssh
containerPort: 22
- name: gogs-http
containerPort: 3000
readinessProbe:
initialDelaySeconds: 180
httpGet:
path: /
port: gogs-http
resources:
requests:
cpu: 100m
memory: 512m
volumeMounts:
- name: gogs-storage
mountPath: /data
initContainers:
- name: gogs-write-main-config
command: ["/bin/sh"]
args:
- "-c"
- >-
mkdir -p /data/gogs/conf &&
python /bin/custom/inject.py /custom/app.ini > /data/gogs/conf/app.ini
envFrom:
- secretRef:
name: gogs-secrets
optional: false
image: python:3.7-alpine
volumeMounts:
- name: gogs-storage
mountPath: /data
- name: gogs-main-config
mountPath: /custom
- name: gogs-secret-inject-script
mountPath: /bin/custom
readOnly: true
volumes:
- name: gogs-storage
persistentVolumeClaim:
claimName: gogs-pv-claim
- name: gogs-main-config
configMap:
name: gogs-main-config
items:
- key: app.ini
path: app.ini
- name: gogs-secret-inject-script
configMap:
name: ini-secret-inject-script
items:
- key: ini-inject-secrets.py
path: inject.py