Skip to content

Commit 7216945

Browse files
committed
feat(cluster): try adding renovate to cluster
1 parent d6d790c commit 7216945

File tree

5 files changed

+124
-0
lines changed

5 files changed

+124
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4+
- renovate/ks.yaml
45
- minecraft/ks.yaml
56
- jackett/ks.yaml
67
- bitmagnet/ks.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
3+
apiVersion: helm.toolkit.fluxcd.io/v2
4+
kind: HelmRelease
5+
metadata:
6+
name: renovate
7+
namespace: renovate
8+
spec:
9+
interval: 10m
10+
chart:
11+
spec:
12+
chart: renovate
13+
version: 1.11.1
14+
sourceRef:
15+
kind: HelmRepository
16+
name: truecharts
17+
namespace: flux-system
18+
interval: 15m
19+
timeout: 20m
20+
maxHistory: 3
21+
install:
22+
createNamespace: true
23+
remediation:
24+
retries: 3
25+
upgrade:
26+
cleanupOnFail: true
27+
remediation:
28+
retries: 3
29+
uninstall:
30+
keepHistory: false
31+
values:
32+
workload:
33+
main:
34+
schedule: "@hourly"
35+
podSpec:
36+
containers:
37+
main:
38+
39+
env:
40+
GITHUB_COM_TOKEN: '${GITHUB_PAT}'
41+
# You can set RENOVATE_AUTODISCOVER to true to run Renovate on all repos you have push access to
42+
RENOVATE_AUTODISCOVER: 'false'
43+
RENOVATE_TOKEN: '${GITHUB_PAT}'
44+
RENOVATE_CONFIG_FILE: /tmp/renovate/config.json
45+
LOGLEVEL: debug
46+
47+
configmap:
48+
config:
49+
enabled: true
50+
data:
51+
config.json: |-
52+
module.exports = {
53+
"dryRun": null,
54+
"username": "truecharts-admin",
55+
"gitAuthor": "truecharts-admin <[email protected]>",
56+
"onboarding": false,
57+
"platform": "github",
58+
"repositoryCache": "enabled",
59+
// https://github.com/renovatebot/renovate/blob/main/lib/util/cache/package/types.ts
60+
// https://github.com/renovatebot/renovate/blob/main/lib/modules/datasource/docker/index.ts <--- See how each namespace is used
61+
// https://docs.renovatebot.com/self-hosted-configuration/#cachettloverride
62+
"cacheTtlOverride": {
63+
"datasource-docker-hub-tags": minPerDay * 3,
64+
"datasource-docker-digest": minPerDay * 3,
65+
},
66+
"dockerMaxPages": 10,
67+
"lockFileMaintenance": { "enabled": true },
68+
"repositories": [
69+
"truecharts/public",
70+
"truecharts/private",
71+
"truecharts/.github"
72+
],
73+
"allowPostUpgradeCommandTemplating": true,
74+
"allowedPostUpgradeCommands": ["^.*"],
75+
"hostRules": [
76+
{
77+
"hostType": "docker",
78+
"matchHost": "docker.io",
79+
// TODO: Add login
80+
"abortIgnoreStatusCodes": [401, 404, 429],
81+
"abortOnError": false
82+
}
83+
],
84+
"packageRules": [
85+
{
86+
"matchManagers": [
87+
"helm-requirements",
88+
"helm-values",
89+
"helmv3",
90+
"custom.regex"
91+
],
92+
"matchDatasources": ["docker"],
93+
"matchUpdateTypes": ["major", "minor", "patch", "pin", "pinDigest", "digest"],
94+
"postUpgradeTasks": {
95+
"fileFilters": ["**/Chart.yaml"],
96+
"executionMode": "update",
97+
"commands": ["./charttool genmeta {{{replace 'digest|pin|pinDigest' 'patch' updateType}}} {{{packageFileDir}}} || true"]
98+
}
99+
},
100+
],
101+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- helm-release.yaml
6+
- namespace.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: renovate
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: kustomize.toolkit.fluxcd.io/v1
2+
kind: Kustomization
3+
metadata:
4+
name: renovate
5+
namespace: flux-system
6+
spec:
7+
interval: 10m
8+
path: clusters/main/kubernetes/apps/renovate/app
9+
prune: true
10+
sourceRef:
11+
kind: GitRepository
12+
name: truecharts

0 commit comments

Comments
 (0)