Skip to content

Commit 6f2f88d

Browse files
feat: add default configuration for in-docker cleaner (#609)
1 parent 1912d84 commit 6f2f88d

File tree

6 files changed

+49
-9
lines changed

6 files changed

+49
-9
lines changed

charts/cf-runtime/Chart.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: A Helm chart for Codefresh Runner
33
name: cf-runtime
4-
version: 8.2.4
4+
version: 8.3.0
55
keywords:
66
- codefresh
77
- runner
@@ -14,13 +14,11 @@ maintainers:
1414
url: https://codefresh-io.github.io/
1515
annotations:
1616
# 💡 Do not forget to update this annotation:
17-
artifacthub.io/containsSecurityUpdates: "true"
17+
artifacthub.io/containsSecurityUpdates: "false"
1818
# Supported kinds: `added`, `changed`, `deprecated`, `removed`, `fixed`, `security`:
1919
artifacthub.io/changes: |
20-
- kind: changed
21-
description: "Update \"dind\" to version 28.3.3-3.0.2."
22-
- kind: security
23-
description: "Fix CVE-2025-48060, CVE-2024-23337, CVE-2024-53427, GO-2025-3787, CVE-2025-32728, CVE-2025-5025."
20+
- kind: added
21+
description: "Add default configuration for in-docker cleaner."
2422
dependencies:
2523
- name: cf-common
2624
repository: oci://quay.io/codefresh/charts

charts/cf-runtime/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Codefresh Runner
22

3-
![Version: 8.2.4](https://img.shields.io/badge/Version-8.2.4-informational?style=flat-square)
3+
![Version: 8.3.0](https://img.shields.io/badge/Version-8.3.0-informational?style=flat-square)
44

55
Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes.
66

@@ -1299,11 +1299,17 @@ Install the Helm chart
12991299
| runtime.accounts | list | `[]` | (for On-Premise only) Assign accounts to runtime (list of account ids) |
13001300
| runtime.agent | bool | `true` | (for On-Premise only) Enable agent |
13011301
| runtime.description | string | `""` | Runtime description |
1302-
| runtime.dind | object | `{"affinity":{},"containerSecurityContext":{},"env":{"CLEAN_DOCKER":true},"image":{"digest":"sha256:0f2a83603e27e6d88768a6ab8ead3e2426eaf989cd93919fa1128d98a7c617c6","pullPolicy":"IfNotPresent","registry":"quay.io","repository":"codefresh/dind","tag":"28.3.3-3.0.2"},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"podSecurityContext":{},"pvcs":{"dind":{"annotations":{},"name":"dind","reuseVolumeSelector":"codefresh-app,io.codefresh.accountName","reuseVolumeSortOrder":"pipeline_id","storageClassName":"{{ include \"dind-volume-provisioner.storageClassName\" . }}","volumeSize":"16Gi"}},"resources":{"limits":{"cpu":"400m","memory":"800Mi"},"requests":null},"schedulerName":"","serviceAccount":"codefresh-engine","terminationGracePeriodSeconds":30,"tolerations":[],"userAccess":true,"userVolumeMounts":{},"userVolumes":{},"volumePermissions":{"enabled":false,"image":{"digest":"sha256:de0eb0b3f2a47ba1eb89389859a9bd88b28e82f5826b6969ad604979713c2d4f","registry":"docker.io","repository":"alpine","tag":3.18},"resources":{},"securityContext":{"runAsUser":0}}}` | Parameters for DinD (docker-in-docker) pod (aka "runtime" pod). |
1302+
| runtime.dind | object | `{"affinity":{},"containerSecurityContext":{},"env":{"CLEAN_DOCKER":true,"CLEAN_PERIOD_BUILDS":"5","CLEAN_PERIOD_SECONDS":"21600","DISK_USAGE_THRESHOLD":"0.8","IMAGE_RETAIN_PERIOD":"14400","INODES_USAGE_THRESHOLD":"0.8","VOLUMES_RETAIN_PERIOD":"14400"},"image":{"digest":"sha256:0f2a83603e27e6d88768a6ab8ead3e2426eaf989cd93919fa1128d98a7c617c6","pullPolicy":"IfNotPresent","registry":"quay.io","repository":"codefresh/dind","tag":"28.3.3-3.0.2"},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"podSecurityContext":{},"pvcs":{"dind":{"annotations":{},"name":"dind","reuseVolumeSelector":"codefresh-app,io.codefresh.accountName","reuseVolumeSortOrder":"pipeline_id","storageClassName":"{{ include \"dind-volume-provisioner.storageClassName\" . }}","volumeSize":"16Gi"}},"resources":{"limits":{"cpu":"400m","memory":"800Mi"},"requests":null},"schedulerName":"","serviceAccount":"codefresh-engine","terminationGracePeriodSeconds":30,"tolerations":[],"userAccess":true,"userVolumeMounts":{},"userVolumes":{},"volumePermissions":{"enabled":false,"image":{"digest":"sha256:de0eb0b3f2a47ba1eb89389859a9bd88b28e82f5826b6969ad604979713c2d4f","registry":"docker.io","repository":"alpine","tag":3.18},"resources":{},"securityContext":{"runAsUser":0}}}` | Parameters for DinD (docker-in-docker) pod (aka "runtime" pod). |
13031303
| runtime.dind.affinity | object | `{}` | Set affinity |
13041304
| runtime.dind.containerSecurityContext | object | `{}` | Set container security context. |
1305-
| runtime.dind.env | object | `{"CLEAN_DOCKER":true}` | Set additional env vars. |
1305+
| runtime.dind.env | object | `{"CLEAN_DOCKER":true,"CLEAN_PERIOD_BUILDS":"5","CLEAN_PERIOD_SECONDS":"21600","DISK_USAGE_THRESHOLD":"0.8","IMAGE_RETAIN_PERIOD":"14400","INODES_USAGE_THRESHOLD":"0.8","VOLUMES_RETAIN_PERIOD":"14400"}` | Set additional env vars. |
13061306
| runtime.dind.env.CLEAN_DOCKER | bool | `true` | Enable in-docker cleaner |
1307+
| runtime.dind.env.CLEAN_PERIOD_BUILDS | string | `"5"` | Run cleanup if there have been more than CLEAN_PERIOD_BUILDS builds since the last cleanup |
1308+
| runtime.dind.env.CLEAN_PERIOD_SECONDS | string | `"21600"` | Run cleanup if the last cleanup was more than CLEAN_PERIOD_SECONDS seconds ago |
1309+
| runtime.dind.env.DISK_USAGE_THRESHOLD | string | `"0.8"` | Run cleanup if current disk usage exceeds DISK_USAGE_THRESHOLD |
1310+
| runtime.dind.env.IMAGE_RETAIN_PERIOD | string | `"14400"` | Do not delete Docker images if they have events newer than `NOW minus IMAGE_RETAIN_PERIOD` |
1311+
| runtime.dind.env.INODES_USAGE_THRESHOLD | string | `"0.8"` | Run cleanup if current inodes usage exceeds INODES_USAGE_THRESHOLD |
1312+
| runtime.dind.env.VOLUMES_RETAIN_PERIOD | string | `"14400"` | Do not delete Docker volumes if they have events newer than `NOW minus VOLUMES_RETAIN_PERIOD` |
13071313
| runtime.dind.image | object | `{"digest":"sha256:0f2a83603e27e6d88768a6ab8ead3e2426eaf989cd93919fa1128d98a7c617c6","pullPolicy":"IfNotPresent","registry":"quay.io","repository":"codefresh/dind","tag":"28.3.3-3.0.2"}` | Set dind image. |
13081314
| runtime.dind.nodeSelector | object | `{}` | Set node selector. |
13091315
| runtime.dind.podAnnotations | object | `{}` | Set pod annotations. |

charts/cf-runtime/tests/private-registry/private_registry_test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ tests:
116116
userAccess: true
117117
envVars:
118118
CLEAN_DOCKER: 'true'
119+
CLEAN_PERIOD_BUILDS: '5'
120+
CLEAN_PERIOD_SECONDS: '21600'
121+
DISK_USAGE_THRESHOLD: '0.8'
122+
IMAGE_RETAIN_PERIOD: '14400'
123+
INODES_USAGE_THRESHOLD: '0.8'
124+
VOLUMES_RETAIN_PERIOD: '14400'
119125
OTEL_RESOURCE_ATTRIBUTES: service.name=cf-classic-dind,service.version=tagoverride,service.namespace=cf-classic-runtime,cf.classic.runtime.name=my-context/codefresh,cf.classic.runtime.version=1.0.0
120126
cluster:
121127
namespace: codefresh

charts/cf-runtime/tests/runtime/runtime_onprem_test.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,14 @@ tests:
147147
envVars:
148148
ALICE: 'BOB'
149149
CLEAN_DOCKER: 'true'
150+
CLEAN_PERIOD_BUILDS: '5'
151+
CLEAN_PERIOD_SECONDS: '21600'
152+
DISK_USAGE_THRESHOLD: '0.8'
150153
FLOAT_AS_STRING: '12.34'
154+
IMAGE_RETAIN_PERIOD: '14400'
155+
INODES_USAGE_THRESHOLD: '0.8'
151156
INT: '123'
157+
VOLUMES_RETAIN_PERIOD: '14400'
152158
OTEL_RESOURCE_ATTRIBUTES: service.name=cf-classic-dind,service.version=tagoverride,service.namespace=cf-classic-runtime,cf.classic.runtime.name=system/my-runtime,cf.classic.runtime.version=1.0.0
153159
cluster:
154160
namespace: codefresh
@@ -361,8 +367,14 @@ tests:
361367
envVars:
362368
ALICE: 'BOB'
363369
CLEAN_DOCKER: 'true'
370+
CLEAN_PERIOD_BUILDS: '5'
371+
CLEAN_PERIOD_SECONDS: '21600'
372+
DISK_USAGE_THRESHOLD: '0.8'
364373
FLOAT_AS_STRING: '12.34'
374+
IMAGE_RETAIN_PERIOD: '14400'
375+
INODES_USAGE_THRESHOLD: '0.8'
365376
INT: '123'
377+
VOLUMES_RETAIN_PERIOD: '14400'
366378
OTEL_RESOURCE_ATTRIBUTES: service.name=cf-classic-dind,service.version=tagoverride,service.namespace=cf-classic-runtime,cf.classic.runtime.name=system/default-override,cf.classic.runtime.version=1.0.0
367379
cluster:
368380
namespace: codefresh

charts/cf-runtime/tests/runtime/runtime_test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,14 @@ tests:
158158
envVars:
159159
ALICE: 'BOB'
160160
CLEAN_DOCKER: 'true'
161+
CLEAN_PERIOD_BUILDS: '5'
162+
CLEAN_PERIOD_SECONDS: '21600'
163+
DISK_USAGE_THRESHOLD: '0.8'
161164
FLOAT: '12.34'
165+
IMAGE_RETAIN_PERIOD: '14400'
166+
INODES_USAGE_THRESHOLD: '0.8'
162167
INT_AS_STRING: '123'
168+
VOLUMES_RETAIN_PERIOD: '14400'
163169
OTEL_RESOURCE_ATTRIBUTES: service.name=cf-classic-dind,service.version=tagoverride,service.namespace=cf-classic-runtime,cf.classic.runtime.name=my-context/codefresh,cf.classic.runtime.version=1.0.0
164170
cluster:
165171
namespace: codefresh

charts/cf-runtime/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,18 @@ runtime:
449449
env:
450450
# -- Enable in-docker cleaner
451451
CLEAN_DOCKER: true
452+
# -- Run cleanup if the last cleanup was more than CLEAN_PERIOD_SECONDS seconds ago
453+
CLEAN_PERIOD_SECONDS: '21600'
454+
# -- Run cleanup if there have been more than CLEAN_PERIOD_BUILDS builds since the last cleanup
455+
CLEAN_PERIOD_BUILDS: '5'
456+
# -- Do not delete Docker images if they have events newer than `NOW minus IMAGE_RETAIN_PERIOD`
457+
IMAGE_RETAIN_PERIOD: '14400'
458+
# -- Do not delete Docker volumes if they have events newer than `NOW minus VOLUMES_RETAIN_PERIOD`
459+
VOLUMES_RETAIN_PERIOD: '14400'
460+
# -- Run cleanup if current disk usage exceeds DISK_USAGE_THRESHOLD
461+
DISK_USAGE_THRESHOLD: '0.8'
462+
# -- Run cleanup if current inodes usage exceeds INODES_USAGE_THRESHOLD
463+
INODES_USAGE_THRESHOLD: '0.8'
452464
# -- Set pod annotations.
453465
podAnnotations: {}
454466
# -- Set pod labels.

0 commit comments

Comments
 (0)