diff --git a/charts/gitlab/Chart.yaml b/charts/gitlab/Chart.yaml index 27e0d2ab..de73df45 100644 --- a/charts/gitlab/Chart.yaml +++ b/charts/gitlab/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 type: application name: gitlab description: A Helm chart for GitLab Omnibus -version: 3.1.0 +version: 3.1.1 # renovate: image=gitlab/gitlab-ce appVersion: "16.7.3-ce.0" @@ -25,5 +25,5 @@ dependencies: annotations: artifacthub.io/changes: | - - kind: added - description: 'Automate registry garbage collection via cron job.' + - kind: fixed + description: 'Allow specifying custom compute resources for cron jobs.' diff --git a/charts/gitlab/README.md b/charts/gitlab/README.md index 80218d65..4cf05a91 100644 --- a/charts/gitlab/README.md +++ b/charts/gitlab/README.md @@ -2,7 +2,7 @@ > A Helm chart for GitLab Omnibus -[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/gitlab/)[![Version: 3.1.0](https://img.shields.io/badge/Version-3.1.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/gitlab/)[![AppVersion: 16.7.3-ce.0](https://img.shields.io/badge/AppVersion-16.7.3--ce.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/gitlab/) +[![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/gitlab/)[![Version: 3.1.1](https://img.shields.io/badge/Version-3.1.1-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/gitlab/)[![AppVersion: 16.7.3-ce.0](https://img.shields.io/badge/AppVersion-16.7.3--ce.0-informational?style=flat-square) ](https://charts.pascaliske.dev/charts/gitlab/) * * @@ -44,6 +44,7 @@ The following values can be used to adjust the helm chart. | backups.cronJob.enabled | bool | `false` | Create a `CronJob` object for automated backups. | | backups.cronJob.failedJobsHistoryLimit | int | `1` | The number of failed finished jobs to retain. | | backups.cronJob.labels | object | `{}` | Additional labels for the cronjob object. | +| backups.cronJob.resources | object | `{}` | Compute resources used by the container inside the cronjob. More info [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). | | backups.cronJob.schedule | string | `"0 3 * * 1"` | Schedule for automated backups. | | backups.cronJob.successfulJobsHistoryLimit | int | `3` | The number of successful finished jobs to retain. | | backups.cronJob.suspend | bool | `false` | Enable/disable the cron job schedule quickly. | @@ -116,6 +117,7 @@ The following values can be used to adjust the helm chart. | registryGarbageCollection.cronJob.failedJobsHistoryLimit | int | `1` | The number of failed finished jobs to retain. | | registryGarbageCollection.cronJob.labels | object | `{}` | Additional labels for the cronjob object. | | registryGarbageCollection.cronJob.removeUntaggedManifests | bool | `false` | Include untagged manifests and unreferenced layers if set to true. | +| registryGarbageCollection.cronJob.resources | object | `{}` | Compute resources used by the container inside the cronjob. More info [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). | | registryGarbageCollection.cronJob.schedule | string | `"0 3 * * 1"` | Schedule for automated garbage collections. | | registryGarbageCollection.cronJob.successfulJobsHistoryLimit | int | `3` | The number of successful finished jobs to retain. | | registryGarbageCollection.cronJob.suspend | bool | `false` | Enable/disable the cron job schedule quickly. | diff --git a/charts/gitlab/templates/cronjob-backup.yaml b/charts/gitlab/templates/cronjob-backup.yaml index d09dbe2d..110d7ccc 100644 --- a/charts/gitlab/templates/cronjob-backup.yaml +++ b/charts/gitlab/templates/cronjob-backup.yaml @@ -35,8 +35,8 @@ spec: imagePullPolicy: Always command: ["/bin/sh"] args: ["-c", "{{ include "gitlab.backup.command" . }}"] - resources: {{ if not .Values.resources -}}{}{{- end }} - {{- if .Values.resources }} - {{- toYaml .Values.resources | nindent 16 }} + resources: {{ if not .Values.backups.cronJob.resources -}}{}{{- end }} + {{- if .Values.backups.cronJob.resources }} + {{- toYaml .Values.backups.cronJob.resources | nindent 16 }} {{- end }} {{- end }} diff --git a/charts/gitlab/templates/cronjob-garbage.yaml b/charts/gitlab/templates/cronjob-garbage.yaml index 545232fa..7b828e51 100644 --- a/charts/gitlab/templates/cronjob-garbage.yaml +++ b/charts/gitlab/templates/cronjob-garbage.yaml @@ -35,8 +35,8 @@ spec: imagePullPolicy: Always command: ["/bin/sh"] args: ["-c", "{{ include "gitlab.registryGarbageCollection.command" . }}"] - resources: {{ if not .Values.resources -}}{}{{- end }} - {{- if .Values.resources }} - {{- toYaml .Values.resources | nindent 16 }} + resources: {{ if not .Values.registryGarbageCollection.cronJob.resources -}}{}{{- end }} + {{- if .Values.registryGarbageCollection.cronJob.resources }} + {{- toYaml .Values.registryGarbageCollection.cronJob.resources | nindent 16 }} {{- end }} {{- end }} diff --git a/charts/gitlab/values.yaml b/charts/gitlab/values.yaml index f51630a9..8064212a 100644 --- a/charts/gitlab/values.yaml +++ b/charts/gitlab/values.yaml @@ -170,6 +170,8 @@ backups: successfulJobsHistoryLimit: 3 # -- The number of failed finished jobs to retain. failedJobsHistoryLimit: 1 + # -- Compute resources used by the container inside the cronjob. More info [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). + resources: {} # -- Additional annotations for the cronjob object. annotations: {} # -- Additional labels for the cronjob object. @@ -189,6 +191,8 @@ registryGarbageCollection: successfulJobsHistoryLimit: 3 # -- The number of failed finished jobs to retain. failedJobsHistoryLimit: 1 + # -- Compute resources used by the container inside the cronjob. More info [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). + resources: {} # -- Additional annotations for the cronjob object. annotations: {} # -- Additional labels for the cronjob object.