diff --git a/helm-charts/mend-renovate-ce/templates/deployment.yaml b/helm-charts/mend-renovate-ce/templates/deployment.yaml index 05159f22..890647e9 100644 --- a/helm-charts/mend-renovate-ce/templates/deployment.yaml +++ b/helm-charts/mend-renovate-ce/templates/deployment.yaml @@ -160,6 +160,22 @@ spec: key: mendRnvServerApiSecret optional: true {{- end }} + {{- if .Values.renovate.mendRnvLogHistoryDir }} + - name: MEND_RNV_LOG_HISTORY_DIR + value: {{ .Values.renovate.mendRnvLogHistoryDir }} + {{- end }} + {{- if .Values.renovate.mendRnvLogHistoryTTLDays }} + - name: MEND_RNV_LOG_HISTORY_TTL_DAYS + value: {{ .Values.renovate.mendRnvLogHistoryTTLDays | quote }} + {{- end }} + {{- if .Values.renovate.mendRnvLogHistoryCleanupCron }} + - name: MEND_RNV_LOG_HISTORY_CLEANUP_CRON + value: {{ .Values.renovate.mendRnvLogHistoryCleanupCron }} + {{- end }} + {{- if .Values.renovate.mendRnvWorkerExecutionTimeout }} + - name: MEND_RNV_WORKER_EXECUTION_TIMEOUT + value: {{ .Values.renovate.mendRnvWorkerExecutionTimeout | quote }} + {{- end }} ports: - name: http containerPort: 8080 @@ -206,7 +222,7 @@ spec: persistentVolumeClaim: claimName: {{ .Values.cachePersistence.existingClaim | default (printf "%s-cache" (include "mend-renovate.fullname" .)) }} {{- else }} - emptyDir: {} + emptyDir: { } {{- end }} {{- if ne (len .Values.extraVolumes) 0 }} {{ toYaml .Values.extraVolumes | nindent 8 | trim }} diff --git a/helm-charts/mend-renovate-ce/values.yaml b/helm-charts/mend-renovate-ce/values.yaml index f8481d78..e914bcb3 100644 --- a/helm-charts/mend-renovate-ce/values.yaml +++ b/helm-charts/mend-renovate-ce/values.yaml @@ -74,13 +74,30 @@ renovate: # Optional, defaults to '0 0,4,8,12,16,20 * * *' (every 4 hours) mendRnvCronAppSync: - # Optional + # Optional, a string of a comma separated values. (e.g. `org1/*, org2/test*, org2/test*`). Same behavior as Renovate cli 'autodiscoverFilter' feature + # Warning: The Renovate CLI 'autodiscover' configuration option is disabled. + # Repository filtering should solely rely on server-side filtering using 'mendRnvAutoDiscoverFilter'. mendRnvAutoDiscoverFilter: - # Optional, defaults to 'discovered' + # Optional. Accepted values: 'enabled', 'discovered', and 'disabled'. Defaults to 'discovered'. mendRnvEnqueueJobsOnStartup: - # Self hosted renovate configuration file, will be mounted as a config map + # Optional. Specify a directory path to save Renovate job log files. + # It is recommended to use an external volume to preserve history. + mendRnvLogHistoryDir: + + # Optional: The number of days to save log files. Defaults to 30. + mendRnvLogHistoryTTLDays: + + # Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). + # This cron job cleans up log history in the directory defined by `mendRnvLogHistoryDir`. + # It deletes any log file that exceeds the `mendRnvLogHistoryTTLDays` value. + mendRnvLogHistoryCleanupCron: + + # Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. + mendRnvWorkerExecutionTimeout: + + # Self-hosted renovate configuration file, will be mounted as a config map config: | module.exports = { // Enter self-hosted configuration options here. diff --git a/helm-charts/mend-renovate-ee/templates/deployment-worker.yaml b/helm-charts/mend-renovate-ee/templates/deployment-worker.yaml index 03f721c0..6ede2cd1 100644 --- a/helm-charts/mend-renovate-ee/templates/deployment-worker.yaml +++ b/helm-charts/mend-renovate-ee/templates/deployment-worker.yaml @@ -41,7 +41,7 @@ spec: {{- with .Values.renovateWorker.extraEnvVars }} {{- toYaml . | nindent 12 }} {{- end }} - - name: MEND_RNV_SERVER_HOSTNAME + - name: MEND_RNV_SERVER_HOSTNAME value: "http://{{ include "mend-renovate.fullname" . }}" {{- if or .Values.renovateServer.mendRnvServerApiSecret .Values.renovateServer.existingSecret }} - name: MEND_RNV_SERVER_API_SECRET @@ -78,6 +78,22 @@ spec: key: pipIndexUrl optional: true {{- end }} + {{- if .Values.renovateWorker.mendRnvLogHistoryDir }} + - name: MEND_RNV_LOG_HISTORY_DIR + value: {{ .Values.renovateWorker.mendRnvLogHistoryDir }} + {{- end }} + {{- if .Values.renovateWorker.mendRnvLogHistoryTTLDays }} + - name: MEND_RNV_LOG_HISTORY_TTL_DAYS + value: {{ .Values.renovateWorker.mendRnvLogHistoryTTLDays | quote }} + {{- end }} + {{- if .Values.renovateWorker.mendRnvLogHistoryCleanupCron }} + - name: MEND_RNV_LOG_HISTORY_CLEANUP_CRON + value: {{ .Values.renovateWorker.mendRnvLogHistoryCleanupCron }} + {{- end }} + {{- if .Values.renovateWorker.mendRnvWorkerExecutionTimeout }} + - name: MEND_RNV_WORKER_EXECUTION_TIMEOUT + value: {{ .Values.renovateWorker.mendRnvWorkerExecutionTimeout | quote }} + {{- end }} {{- if .Values.renovateWorker.noNodeTlsVerify }} - name: NODE_TLS_REJECT_UNAUTHORIZED value: '0' diff --git a/helm-charts/mend-renovate-ee/values.yaml b/helm-charts/mend-renovate-ee/values.yaml index 47ef9195..888da3d8 100644 --- a/helm-charts/mend-renovate-ee/values.yaml +++ b/helm-charts/mend-renovate-ee/values.yaml @@ -138,6 +138,21 @@ renovateWorker: tag: 6.7.0-full pullPolicy: IfNotPresent + # Optional. Specify a directory path to save Renovate job log files. + # It is recommended to use an external volume to preserve history. + mendRnvLogHistoryDir: + + # Optional: The number of days to save log files. Defaults to 30. + mendRnvLogHistoryTTLDays: + + # Optional: Specifies a 5-part cron schedule. Defaults to `0 0 * * *` (every midnight). + # This cron job cleans up log history in the directory defined by `mendRnvLogHistoryDir`. + # It deletes any log file that exceeds the `mendRnvLogHistoryTTLDays` value. + mendRnvLogHistoryCleanupCron: + + # Optional: Sets the maximum execution duration of a Renovate CLI scan in minutes. Defaults to 60. + mendRnvWorkerExecutionTimeout: + # Additional worker env vars extraEnvVars: []