-
Notifications
You must be signed in to change notification settings - Fork 1
/
7-gitlab-registry.yaml
87 lines (86 loc) · 1.89 KB
/
7-gitlab-registry.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: registry
namespace: gitlab
labels:
app: gitlab
spec:
selector:
matchLabels:
app: gitlab-registry
serviceName: registry
replicas: 1
volumeClaimTemplates:
- metadata:
name: docker-registry
namespace: gitlab
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 25Gi
selector:
matchLabels:
volume-name: gitlab-docker-registry
template:
metadata:
labels:
app: gitlab-registry
spec:
nodeSelector:
gitlab: "true"
containers:
- name: registry
image: registry:latest
livenessProbe:
tcpSocket:
port: 5000
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
tcpSocket:
port: 5000
initialDelaySeconds: 30
periodSeconds: 10
envFrom:
- configMapRef:
name: registry
- secretRef:
name: registry
resources:
limits:
cpu: "100m"
memory: "100Mi"
requests:
cpu: "100m"
memory: "100Mi"
ports:
- name: registry
containerPort: 5000
volumeMounts:
- name: docker-registry
mountPath: /registry
- name: registry-certs
mountPath: /certs/registry
readOnly: true
volumes:
- name: registry-certs
secret:
secretName: tls-gitlab
---
# -- Service for the Ingress to target
apiVersion: v1
kind: Service
metadata:
name: registry
namespace: gitlab
labels:
app: gitlab
spec:
selector:
app: gitlab-registry
ports:
- name: registry
port: 5000
targetPort: 5000