File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1+ {{ if .Values.buildkitPruner.enabled }}
2+ apiVersion : batch/v1
3+ kind : CronJob
4+ metadata :
5+ name : build-cache-prune
6+ spec :
7+ schedule : {{ .Values.buildkitPruner.schedule | quote }}
8+ # If the previous run is still going, replace it with our new one
9+ concurrencyPolicy : Replace
10+ jobTemplate :
11+ spec :
12+ template :
13+ spec :
14+ restartPolicy : OnFailure
15+ volumes :
16+ - name : dind-socket
17+ hostPath :
18+ path : /var/run/dind/docker.sock
19+ containers :
20+ - name : pruner
21+ image : {{ .Values.buildkitPruner.image }}
22+ env :
23+ - name : DOCKER_HOST
24+ value : " unix:///var/run/dind/docker.sock"
25+ command :
26+ - /bin/sh
27+ - -c
28+ - |
29+ docker builder prune --force --all --keep-storage={{ .Values.buildkitPruner.buildkitCacheSize }} && \
30+ docker system df
31+ volumeMounts :
32+ - name : dind-socket
33+ mountPath : /var/run/dind/docker.sock
34+ {{- end }}
Original file line number Diff line number Diff line change 1- # values ref: https://github.com/yuvipanda/cryptnono/blob/main/cryptnono/values.yaml
21cryptnono :
32 enabled : true
43 detectors :
@@ -10,6 +9,14 @@ cryptnono:
109 containerdHostPath : /run/containerd/containerd.sock
1110 dockerHostPath : /run/dind/docker.sock
1211
12+ buildkitPruner :
13+ enabled : true
14+ # Use the same image as we use for dind
15+ image : docker:27.5.1-dind
16+ buildkitCacheSize : 300GB
17+ # Run this every 30min
18+ schedule : " */30 * * * *"
19+
1320registry :
1421 enabled : false
1522 replicas : 2
You can’t perform that action at this time.
0 commit comments