From 4d747c26c0457f8aafb4bc9774b523030f852033 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 18 May 2022 17:22:45 +0200 Subject: [PATCH] renovate: v/infrastructure (?) --- .../apps/gitops/renovate/external-secret.yaml | 2 +- .../apps/gitops/renovate/kustomization.yaml | 1 + .../renovate/renovate-infrastructure.yaml | 62 +++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 flux/cluster/apps/gitops/renovate/renovate-infrastructure.yaml diff --git a/flux/cluster/apps/gitops/renovate/external-secret.yaml b/flux/cluster/apps/gitops/renovate/external-secret.yaml index fbf70f2..ae63c3f 100644 --- a/flux/cluster/apps/gitops/renovate/external-secret.yaml +++ b/flux/cluster/apps/gitops/renovate/external-secret.yaml @@ -1,7 +1,7 @@ apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: - name: authentik + name: renovate namespace: gitops spec: refreshInterval: "5m" diff --git a/flux/cluster/apps/gitops/renovate/kustomization.yaml b/flux/cluster/apps/gitops/renovate/kustomization.yaml index 020b751..215e80b 100644 --- a/flux/cluster/apps/gitops/renovate/kustomization.yaml +++ b/flux/cluster/apps/gitops/renovate/kustomization.yaml @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - external-secret.yaml + - renovate-infrastructure.yaml diff --git a/flux/cluster/apps/gitops/renovate/renovate-infrastructure.yaml b/flux/cluster/apps/gitops/renovate/renovate-infrastructure.yaml new file mode 100644 index 0000000..bfd14f8 --- /dev/null +++ b/flux/cluster/apps/gitops/renovate/renovate-infrastructure.yaml @@ -0,0 +1,62 @@ +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: renovate-infrastructure + namespace: gitops +spec: + schedule: '@hourly' + concurrencyPolicy: Forbid + jobTemplate: + spec: + template: + spec: + volumes: + - name: config-volume + configMap: + name: renovate-config + - name: work-volume + emptyDir: {} + containers: + - name: renovate + image: renovate/renovate:32.61 + volumeMounts: + - name: config-volume + mountPath: /opt/renovate/ + - name: work-volume + mountPath: /tmp/renovate/ + env: + - name: LOG_LEVEL + value: debug + - name: RENOVATE_ENDPOINT + value: 'https://git.0x76.dev/api/v1/' + - name: RENOVATE_PLATFORM + value: gitea + - name: RENOVATE_AUTODISCOVER + value: 'false' + - name: RENOVATE_GIT_AUTHOR + value: 'Renovate Bot ' + - name: RENOVATE_CONFIG_FILE + value: '/opt/renovate/config.json' + - name: RENOVATE_BASE_DIR + value: '/tmp/renovate' + envFrom: + - secretRef: + name: renovate + restartPolicy: Never +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: renovate-config +data: + config.json: |- + { + "repositories": ["v/infrastructure"], + "flux": { + "fileMatch": ["flux/.+\\.yaml$"] + }, + "kubernetes": { + "fileMatch": ["flux/.+\\.yaml$"] + } + }