Skip to content

Commit

Permalink
feat: add support for config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Doritanh committed Jan 10, 2025
1 parent 32d3fb2 commit 2b016c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
18 changes: 13 additions & 5 deletions charts/renovate/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{{- $configContent := "" }}
{{- if not .Values.renovate.configEnableHelmTpl }}
{{- $configContent = required "A valid .Values.renovate.config entry is required if existingConfigFile is not specified!" .Values.renovate.config | nindent 4 }}
{{- else }}
{{- $configContent = required "A valid .Values.renovate.config entry is required if existingConfigFile is not specified!" (tpl .Values.renovate.config .) | nindent 4 }}
{{- end }}

{{- if not .Values.renovate.existingConfigFile }}
apiVersion: v1
{{- if .Values.renovate.configIsSecret }}
Expand All @@ -15,10 +22,11 @@ stringData:
{{- else }}
data:
{{- end }}
{{- if .Values.renovate.configIsJavascript }}
config.js: |-
{{ $configContent }}
{{- else }}
config.json: |-
{{- if not .Values.renovate.configEnableHelmTpl }}
{{- required "A valid .Values.renovate.config entry is required if existingConfigFile is not specified!" .Values.renovate.config | nindent 4 }}
{{- else }}
{{- required "A valid .Values.renovate.config entry is required if existingConfigFile is not specified!" (tpl .Values.renovate.config .) | nindent 4 }}
{{- end }}
{{ $configContent }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/renovate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ renovate:
# -- Use this to create the renovate-config as a secret instead of a configmap
configIsSecret: false

# -- Use this to create a config.js instead of a config.json
configIsJavascript: false

# -- Renovate Container-level security-context
securityContext: {}

Expand Down

0 comments on commit 2b016c0

Please sign in to comment.