Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow api version override #147

Merged
merged 5 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions charts/renovate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The following table lists the configurable parameters of the chart and the defau

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| apiVersionOverrides.cronjob | string | `""` | String to override apiVersion of cronjob rendered by this helm chart |
| cronjob.annotations | object | `{}` | |
| cronjob.concurrencyPolicy | string | `""` | |
| cronjob.failedJobsHistoryLimit | string | `""` | |
Expand All @@ -47,11 +48,11 @@ The following table lists the configurable parameters of the chart and the defau
| cronjob.labels | object | `{}` | |
| cronjob.schedule | string | `"0 1 * * *"` | |
| cronjob.successfulJobsHistoryLimit | string | `""` | |
| dind.enabled | bool | `false` | |
| dind.enabled | bool | `false` | Enable dind sidecar usage? |
| dind.image.pullPolicy | string | `"IfNotPresent"` | |
| dind.image.repository | string | `"docker.io/library/docker"` | |
| dind.image.tag | string | `"20.10.7-dind"` | |
| dind.slim.enabled | bool | `true` | |
| dind.slim.enabled | bool | `true` | Do not add `-slim` suffix to image tag when using dind |
| env | object | `{}` | |
| envFrom | list | `[]` | |
| existingSecret | string | `""` | |
Expand All @@ -61,12 +62,12 @@ The following table lists the configurable parameters of the chart and the defau
| imagePullSecrets | object | `{}` | |
| pod.annotations | object | `{}` | |
| pod.labels | object | `{}` | |
| redis.cluster.enabled | bool | `false` | |
| redis.enabled | bool | `false` | |
| redis.cluster.enabled | bool | `false` | Do not use clustering, not supported by renovate |
| redis.enabled | bool | `false` | Enable the Redis subchart? |
| redis.nameOverride | string | `"redis"` | |
| redis.usePassword | bool | `false` | |
| renovate.config | string | `""` | |
| renovate.existingConfigFile | string | `""` | |
| renovate.config | string | `""` | Inline global renovate config.json |
| renovate.existingConfigFile | string | `""` | Custom exiting global renovate config |
| resources | object | `{}` | |
| secrets | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
Expand Down
12 changes: 7 additions & 5 deletions charts/renovate/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{{- if .Capabilities.APIVersions.Has "batch/v1/CronJob" }}
{{- if .Values.apiVersionOverrides.cronjob -}}
apiVersion: {{ .Values.apiVersionOverrides.cronjob }}
{{- else if .Capabilities.APIVersions.Has "batch/v1/CronJob" }}
apiVersion: batch/v1
{{- else if .Capabilities.APIVersions.Has "batch/v1beta1/CronJob" }}
{{- else if .Capabilities.APIVersions.Has "batch/v1beta1/CronJob" }}
apiVersion: batch/v1beta1
{{- else }}
{{- fail "\n\n ERROR: You must have at least batch/v1beta1 to use CronJob" }}
{{- end }}
{{- else }}
{{- fail "\n\n ERROR: You must have at least batch/v1beta1 to use CronJob" }}
{{- end }}
kind: CronJob
metadata:
name: {{ include "renovate.fullname" . }}
Expand Down
15 changes: 13 additions & 2 deletions charts/renovate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ image:
imagePullSecrets: {}

renovate:
# -- Custom exiting global renovate config
existingConfigFile: ''
# -- Inline global renovate config.json
config: ''
# See https://docs.renovatebot.com/self-hosted-configuration
# config: |
Expand Down Expand Up @@ -50,9 +52,10 @@ secrets: {}
existingSecret: ''

dind:
# Enable dind sidecar?
# -- Enable dind sidecar usage?
enabled: false
slim:
# -- Do not add `-slim` suffix to image tag when using dind
enabled: true
image:
repository: docker.io/library/docker
Expand Down Expand Up @@ -89,7 +92,7 @@ redis:
# Configuration for a Redis subchart. Additional documenation at
# https://github.com/bitnami/charts/tree/master/bitnami/redis

# Enable the Redis subchart?
# -- Enable the Redis subchart?
enabled: false

# Must be defined since redis.fullname references .Chart.Name which is different in the subchart.
Expand All @@ -98,7 +101,15 @@ redis:

# Disable clustering by default
cluster:
# -- Do not use clustering, not supported by renovate
enabled: false

# Don't require a password by default
usePassword: false

# Override APIVersions
# If you want to template helm charts but cannot access k8s API server
# you can set api versions here
apiVersionOverrides:
# -- String to override apiVersion of cronjob rendered by this helm chart
cronjob: ''