Commit a6c24804 authored by MBcom's avatar MBcom Committed by Shinya Maeda
Browse files

feat: Allow configuring additional volumes, and volume mounts

parent 3cfbc679
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
apiVersion: v1
description: GitLab's Auto-deploy Helm Chart
name: auto-deploy-app
version: 2.38.1
version: 2.39.0
icon: https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png
+5 −0
Original line number Diff line number Diff line
@@ -123,12 +123,17 @@
| persistence.volumes[].claim.accessMode   | The access mode of the PVC. | `ReadWriteOnce` |
| persistence.volumes[].claim.size         | The storage size of the PVC. | `8Gi` |
| persistence.volumes[].claim.storageClass | (Optional) The storage class of the PVC. If not specified, it falls back to the default storage class from the provider. | `nil` |
| extraVolumes | This field allows to add extra volumes to your Deployment. | `[]` |
| extraVolumeMounts | This field allows to add extra volume mounts to your Deployment. | `[]` |
| cronjobs                            | Define your jobs in this section, an example of the definition can be found in values.yaml | `nil` |
| cronjob.job.failedJobsHistoryLimit          | This field specify how many failed jobs are kept | `1` |
| cronjob.job.startingDeadlineSeconds         | If a CronJob controller cannot start a job run on its schedule, it will keep retrying until the value (In seconds) is reached. | `300` |
| cronjob.job.successfulJobsHistoryLimit      | This field specify how many completed jobs are kept | `1` |
| cronjob.job.concurrencyPolicy               | If `cronjob.concurrencyPolicy` is set to Forbid and a CronJob was attempted to be scheduled when there was a previous schedule still running, then it would count as missed. | `Forbid` |
| cronjob.job.restartPolicy                   | Possible values: `Always`, `OnFailure` and `Never` | `OnFailure` |
| cronjob.job.extraVolumes | This field allows to add extra volumes to CronJob Pods. | `[]` |
| cronjob.job.extraVolumeMounts | This field allows to add extra volume mounts to CronJob Pods. | `[]` |
| cronjob.job.livenessProbe           | If defined, enables livenessProbe in the cronjob. If not defined, it uses top-level `livenessProbe` setting to the job. (To see details about the default probes check values.yaml) | |
| cronjob.job.readinessProbe           | If defined, enables readinessProbe in the cronjob. If not defined, it uses top-level `readinessProbe` setting to the job. (To see details about the default probes check values.yaml) | |
| cronjob.activeDeadlineSeconds           | Alternative to terminate a Job: Once a Job reaches `activeDeadlineSeconds` value, all of its running Pods are terminated and the Job status will become `type: Failed` with `reason: DeadlineExceeded` | `nil` |
+8 −0
Original line number Diff line number Diff line
@@ -65,6 +65,10 @@ items:
            {{ toYaml $affinityConfig | nindent 14 }}
            {{- end }}
            {{- end }}
            {{- if $jobConfig.extraVolumes }}
            volumes:
            {{ toYaml $jobConfig.extraVolumes | nindent 14 }}
            {{- end }}
            containers:
            - name: {{ $.Chart.Name }}
              image: "{{ template "cronjobimagename" (dict "job" . "glob" $.Values) }}"
@@ -161,5 +165,9 @@ items:
              {{- end }}
              resources:
                {{ toYaml $.Values.resources | nindent 16 }}
              {{- if $jobConfig.extraVolumeMounts }}
              volumeMounts:
              {{ toYaml $jobConfig.extraVolumeMounts | nindent 16 }}         
              {{- end }}                
{{- end -}}
{{- end -}}
+12 −2
Original line number Diff line number Diff line
@@ -68,15 +68,20 @@ spec:
      topologySpreadConstraints:
{{ toYaml .Values.topologySpreadConstraints | indent 8 }}
{{- end }}
{{- if or (.Values.persistence.enabled) (.Values.extraVolumes) }}
      volumes:
{{- if .Values.persistence.enabled }}
{{- $context := . }}
      volumes:
{{- range $volume := .Values.persistence.volumes }}
        - name: {{ $volume.name | quote }}
          persistentVolumeClaim:
            {{ $args := dict "context" $context "name" $volume.name }}
            claimName: {{ template "pvcName" $args }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{ toYaml .Values.extraVolumes | indent 8 }}
{{- end }}
{{- end }}
      terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.hostAliases }}
@@ -217,8 +222,9 @@ spec:
{{- end }}
        resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.persistence.enabled }}
{{- if or (.Values.persistence.enabled) (.Values.extraVolumeMounts) }}
        volumeMounts:
{{- if .Values.persistence.enabled }}        
{{- range $volume := .Values.persistence.volumes }}
          - name: {{ $volume.name | quote }}
            mountPath: {{ $volume.mount.path | quote }}
@@ -227,4 +233,8 @@ spec:
            {{- end }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | indent 10 }}           
{{- end }}
{{- end }}
{{- end -}}
+8 −0
Original line number Diff line number Diff line
@@ -88,6 +88,10 @@ items:
{{- if $workerConfig.hostAliases }}
        hostAliases:
{{ $workerConfig.hostAliases | indent 10 }}
{{- end }}
{{- if $workerConfig.extraVolumes }}
        volumes:
{{ toYaml $workerConfig.extraVolumes | indent 10 }}
{{- end }}
        containers:
        - name: {{ $.Chart.Name }}-{{ $workerName }}
@@ -177,5 +181,9 @@ items:
          {{- end }}
          resources:
{{ $workerConfig.resources | default $.Values.resources | toYaml | indent 12 }}
{{- if $workerConfig.extraVolumeMounts }}
          volumeMounts:
{{ toYaml $workerConfig.extraVolumeMounts | indent 12 }}         
{{- end }}
{{- end -}}
{{- end -}}
Loading