-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
54 lines (54 loc) · 1.63 KB
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: registry-cache
name: registry-cache
spec:
replicas: 1
selector:
matchLabels:
app: registry-cache
template:
metadata:
labels:
app: registry-cache
name: registry-cache
spec:
volumes:
- name: pull-secret
hostPath:
path: /opt/registry/pull-secret.json
- name: certs
hostPath:
path: /opt/registry/certs
type: Directory
- name: data
hostPath:
path: /opt/registry/data
type: Directory
restartPolicy: Always
containers:
- name: registry-cache
image: quay.io/mvalledi/registry-cache:latest
env:
- name: CLEANER_MAXSIZE
value: "10G" # Max Size in human redeable size (M, MB, MiB, G, GB, GiB, ...)
- name: CLEANER_THRESHOLD_PERCENTAGE
value: "20" # Percentage threshold. If cache takes CLEANER_MAXSIZE+CLEANER_THRESHOLD_PERCENTAGE%, then cleaner cleans
- name: CLEANER_RUNEVERY_TIME
value: "30m" # Cleaner check every CLEANER_RUNEVERY_TIME the cache size. In format "1h2m3s"
- name: "IGNOREREGISTRYLIST" # List of registries to ignore from pull-secret. Ignored won't be cached
value: 'another-registry.example.com:5000 cloud.openshift.com'
ports:
- name: registry
containerPort: 8443
hostPort: 8443
hostNetwork: true
volumeMounts:
- name: pull-secret
mountPath: /pull-secret.json
- name: certs
mountPath: /certs
- name: data
mountPath: /var/lib/registry