Skip to content

Commit

Permalink
Allow to specify resources block for garbage-collector
Browse files Browse the repository at this point in the history
  • Loading branch information
baznikin committed Apr 15, 2024
1 parent 4a8beac commit e9350ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ their default values.
| `extraEnvVars` | Additional environment variables to the pod | `[]` |
| `initContainers` | Init containers to be created in the pod | `[]` |
| `garbageCollect.enabled` | If true, will deploy garbage-collector cronjob | `false` |
| `garbageCollect.deleteUntagged` | If true, garbage-collector will delete manifests that are not currently referenced via tag | `true` | |
| `garbageCollect.schedule` | CronTab schedule, please use standard crontab format | `0 1 * * *` | |
| `garbageCollect.deleteUntagged` | If true, garbage-collector will delete manifests that are not currently referenced via tag | `true` |
| `garbageCollect.schedule` | CronTab schedule, please use standard crontab format | `0 1 * * *` |
| `garbageCollect.resources` | garbage-collector requested resources | `{}` |

Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.
Expand Down
1 change: 1 addition & 0 deletions templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:
- garbage-collect
- --delete-untagged={{ .Values.garbageCollect.deleteUntagged }}
- /etc/docker/registry/config.yml
resources: {{ toYaml .Values.garbageCollect.resources | nindent 12 }}
env: {{ include "docker-registry.envs" . | nindent 16 }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{ omit .Values.containerSecurityContext "enabled" | toYaml | nindent 16 }}
Expand Down
1 change: 1 addition & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ garbageCollect:
enabled: false
deleteUntagged: true
schedule: "0 1 * * *"
resources: {}

0 comments on commit e9350ee

Please sign in to comment.