From 1f034539534b9ba51e73819161419e33bd5cf523 Mon Sep 17 00:00:00 2001 From: Billy Tobon <billy.tobon@gmail.com> Date: Mon, 12 Oct 2020 01:58:00 -0400 Subject: [PATCH] docs: Adds example using ConfigMap for config.json in kubernetes (#7437) Co-authored-by: Michael Kriese <michael.kriese@visualon.de> --- docs/usage/self-hosting.md | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/docs/usage/self-hosting.md b/docs/usage/self-hosting.md index 8357a32070..95a483e8e1 100644 --- a/docs/usage/self-hosting.md +++ b/docs/usage/self-hosting.md @@ -83,6 +83,62 @@ stringData: RENOVATE_TOKEN: 'your-github-enterprise-renovate-user-token' ``` +A `config.js` file can be added to the manifest using a `ConfigMap` as shown in the following example (using a "dry run" in github.com) + +```yaml +--- + apiVersion: v1 +kind: ConfigMap +metadata: + name: renovate-config +data: + config.json: |- + { + "logLevel" : "debug", + "repositories": ["orgname/repo","username/repo"], + "dryRun" : "true" + } + +--- +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: renovate-bot +spec: + schedule: '@hourly' + concurrencyPolicy: Forbid + jobTemplate: + spec: + template: + spec: + containers: + - image: renovate/renovate:23.22.1 + name: renovate-bot + env: # For illustration purposes, please user secrets. + - name: RENOVATE_PLATFORM + value: 'github' + - name: RENOVATE_TOKEN + value: 'some-token' + - name: RENOVATE_AUTODISCOVER + value: 'false' + - name: RENOVATE_BASE_DIR + value: '/tmp/renovate/' + - name: RENOVATE_CONFIG_FILE + value: '/opt/renovate/config.json' + volumeMounts: + - name: config-volume + mountPath: /opt/renovate/ + - name: work-volume + mountPath: /tmp/renovate/ + restartPolicy: Never + volumes: + - name: config-volume + configMap: + name: renovate-config + - name: work-volume + emptyDir: {} +``` + ## Configuration Self-hosted Renovate can be configured using any of the following (or a combination): -- GitLab