Skip to content

Commit 031320e

Browse files
Migrate renovate config (#576)
Co-authored-by: Tim Ebert <[email protected]>
1 parent 28a99eb commit 031320e

File tree

1 file changed

+134
-43
lines changed

1 file changed

+134
-43
lines changed

.github/renovate.json5

Lines changed: 134 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,52 @@
55
':semanticCommitsDisabled',
66
'customManagers:githubActionsVersions',
77
],
8-
labels: ['dependencies'],
9-
postUpdateOptions: ['gomodTidy'],
8+
labels: [
9+
'dependencies',
10+
],
11+
postUpdateOptions: [
12+
'gomodTidy',
13+
],
1014
automergeStrategy: 'squash',
1115
// required for automerging patch updates
1216
separateMinorPatch: true,
1317
kubernetes: {
14-
fileMatch: ['\\.yaml$'],
18+
managerFilePatterns: [
19+
'/\\.yaml$/',
20+
],
1521
},
1622
customManagers: [
1723
{
1824
// generic detection for install manifests from GitHub releases
1925
customType: 'regex',
20-
fileMatch: ['kustomization\\.yaml$'],
21-
matchStrings: ['https://github\\.com/(?<depName>.*/.*?)/releases/download/(?<currentValue>.*?)/'],
26+
managerFilePatterns: [
27+
'/kustomization\\.yaml$/',
28+
],
29+
matchStrings: [
30+
'https://github\\.com/(?<depName>.*/.*?)/releases/download/(?<currentValue>.*?)/',
31+
],
2232
datasourceTemplate: 'github-releases',
2333
},
2434
{
2535
// generic detection for raw manifests from GitHub refs
2636
customType: 'regex',
27-
fileMatch: ['kustomization\\.yaml$'],
28-
matchStrings: ['https://raw.githubusercontent.com/(?<depName>.*?/.*?)/(?<currentValue>.*?)/'],
37+
managerFilePatterns: [
38+
'/kustomization\\.yaml$/',
39+
],
40+
matchStrings: [
41+
'https://raw.githubusercontent.com/(?<depName>.*?/.*?)/(?<currentValue>.*?)/',
42+
],
2943
datasourceTemplate: 'github-releases',
3044
},
3145
{
3246
// update `_VERSION` variables in Makefiles and scripts
3347
// inspired by `regexManagers:dockerfileVersions` preset
3448
customType: 'regex',
35-
fileMatch: ['Makefile$', '\\.mk$', '\\.sh$'],
49+
managerFilePatterns: [
50+
'/Makefile$/',
51+
'/\\.mk$/',
52+
'/\\.sh$/',
53+
],
3654
matchStrings: [
3755
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[^\\s]+?))?(?: extractVersion=(?<extractVersion>[^\\s]+?))?(?: registryUrl=(?<registryUrl>[^\\s]+?))?\\s.+?_VERSION *[?:]?= *"?(?<currentValue>.+?)"?\\s',
3856
],
@@ -41,39 +59,60 @@
4159
packageRules: [
4260
{
4361
// disable update of dependency on the main module
44-
matchPackageNames: ['github.com/timebertt/kubernetes-controller-sharding'],
62+
matchPackageNames: [
63+
'github.com/timebertt/kubernetes-controller-sharding',
64+
],
4565
enabled: false,
4666
},
4767
{
4868
// automerge non-major updates except 0.* versions
4969
// similar to :automergeStableNonMajor preset, but also works for versioning schemes without range support
50-
matchUpdateTypes: ['minor', 'patch'],
70+
matchUpdateTypes: [
71+
'minor',
72+
'patch',
73+
],
5174
matchCurrentVersion: '!/^v?0\\./',
5275
automerge: true,
5376
},
5477
{
5578
// automerge patch updates
56-
matchUpdateTypes: ['patch'],
79+
matchUpdateTypes: [
80+
'patch',
81+
],
5782
automerge: true,
5883
},
5984
{
6085
// automerge non-major golang.org/x updates
61-
matchDatasources: ['go'],
62-
matchPackageNames: ['golang.org/x/*'],
63-
matchUpdateTypes: ['minor', 'patch', 'digest'],
86+
matchDatasources: [
87+
'go',
88+
],
89+
matchPackageNames: [
90+
'golang.org/x/*',
91+
],
92+
matchUpdateTypes: [
93+
'minor',
94+
'patch',
95+
'digest',
96+
],
6497
automerge: true,
6598
},
6699
{
67100
// disable automerge for go minor updates
68-
matchDatasources: ['golang-version'],
69-
matchUpdateTypes: ['minor'],
101+
matchDatasources: [
102+
'golang-version',
103+
],
104+
matchUpdateTypes: [
105+
'minor',
106+
],
70107
automerge: false,
71108
},
72109
{
73110
// bump k8s and controller-runtime go dependencies together
74111
groupName: 'k8s packages',
75112
groupSlug: 'k8s-go',
76-
matchDatasources: ['go'],
113+
matchDatasources: [
114+
'go',
115+
],
77116
matchPackageNames: [
78117
// from "group:kubernetes"
79118
'k8s.io/api',
@@ -110,79 +149,131 @@
110149
// disable automerge for k8s minor updates
111150
matchPackageNames: [
112151
// datasource=go
113-
'k8s.io/*', // includes more than the k8s-go group! (e.g., k8s.io/utils)
152+
'k8s.io/**', // includes more than the k8s-go group! (e.g., k8s.io/utils)
114153
'sigs.k8s.io/controller-runtime',
115154
// datasource=github-releases
116155
'kubernetes/kubernetes',
117156
'kubernetes-sigs/controller-tools',
118157
],
119-
matchUpdateTypes: ['minor'],
158+
matchUpdateTypes: [
159+
'minor',
160+
],
120161
automerge: false,
121162
},
122163
{
123164
// automerge k8s.io/utils updates
124-
matchDatasources: ['go'],
125-
matchPackageNames: ['k8s.io/utils'],
126-
matchUpdateTypes: ['digest'],
165+
matchDatasources: [
166+
'go',
167+
],
168+
matchPackageNames: [
169+
'k8s.io/utils',
170+
],
171+
matchUpdateTypes: [
172+
'digest',
173+
],
127174
automerge: true,
128175
},
129176
{
130177
// jsonpatch major version has to be kept in sync with k8s and controller-runtime dependencies
131-
matchDatasources: ['go'],
132-
matchPackageNames: ['gomodules.xyz/jsonpatch/*'],
133-
matchUpdateTypes: ['major'],
134-
enabled: false
178+
matchDatasources: [
179+
'go',
180+
],
181+
matchPackageNames: [
182+
'gomodules.xyz/jsonpatch/*',
183+
],
184+
matchUpdateTypes: [
185+
'major',
186+
],
187+
enabled: false,
135188
},
136189
{
137190
// kind minor k8s version should be updated together with shoot k8s version
138-
matchPackageNames: ['kindest/node'],
139-
matchUpdateTypes: ['minor'],
191+
matchPackageNames: [
192+
'kindest/node',
193+
],
194+
matchUpdateTypes: [
195+
'minor',
196+
],
140197
enabled: false,
141198
},
142199
// don't add internal dependency updates to release notes
143200
{
144-
matchFileNames: ["hack/config/**", "hack/tools.mk"],
145-
matchPackageNames: ["!kubernetes-sigs/controller-tools", "!ko-build/ko"],
146-
addLabels: ['no-release-note']
201+
matchFileNames: [
202+
'hack/config/**',
203+
'hack/tools.mk',
204+
],
205+
matchPackageNames: [
206+
'!kubernetes-sigs/controller-tools',
207+
'!ko-build/ko',
208+
],
209+
addLabels: [
210+
'no-release-note',
211+
],
147212
},
148213
{
149-
matchDatasources: ['go'],
150-
matchPackageNames: ['github.com/onsi/gomega', 'github.com/onsi/ginkgo/*', 'k8s.io/utils'],
151-
addLabels: ['no-release-note']
214+
matchDatasources: [
215+
'go',
216+
],
217+
matchPackageNames: [
218+
'github.com/onsi/gomega',
219+
'github.com/onsi/ginkgo/*',
220+
'k8s.io/utils',
221+
],
222+
addLabels: [
223+
'no-release-note',
224+
],
152225
},
153226
{
154227
// combine upgrade of manifests and image tag in one PR
155228
groupName: 'external-dns',
156-
matchPackageNames: ['/external-dns/'],
229+
matchPackageNames: [
230+
'/external-dns/',
231+
],
157232
},
158233
{
159234
// special case for ingress-nginx: version is prefixed with `controller-`
160-
matchDatasources: ['github-releases'],
161-
matchPackageNames: ['kubernetes/ingress-nginx'],
235+
matchDatasources: [
236+
'github-releases',
237+
],
238+
matchPackageNames: [
239+
'kubernetes/ingress-nginx',
240+
],
162241
versionCompatibility: '^(?<compatibility>.*)-(?<version>.+)$',
163242
},
164243
{
165244
// manual action required: upgrading kube-prometheus is not fully automated yet
166-
matchDatasources: ['github-releases'],
167-
matchPackageNames: ['prometheus-operator/kube-prometheus'],
245+
matchDatasources: [
246+
'github-releases',
247+
],
248+
matchPackageNames: [
249+
'prometheus-operator/kube-prometheus',
250+
],
168251
prHeader: '⚠️ Manual action required ⚠️\nPlease check this PR out and run `hack/config/monitoring/update.sh`.',
169252
},
170253
{
171254
// kube-prometheus manifests are generated and managed by update.sh, disable renovate bumps
172-
matchFileNames: ['hack/config/monitoring/{crds,kube-prometheus}/**'],
255+
matchFileNames: [
256+
'hack/config/monitoring/{crds,kube-prometheus}/**',
257+
],
173258
enabled: false,
174259
},
175260
// help renovate fetch changelogs for packages that don't have any sourceUrl metadata attached
176261
{
177-
matchPackageNames: ['registry.k8s.io/prometheus-adapter/prometheus-adapter'],
262+
matchPackageNames: [
263+
'registry.k8s.io/prometheus-adapter/prometheus-adapter',
264+
],
178265
changelogUrl: 'https://github.com/kubernetes-sigs/prometheus-adapter',
179266
},
180267
{
181-
matchPackageNames: ['registry.k8s.io/kube-state-metrics/kube-state-metrics'],
268+
matchPackageNames: [
269+
'registry.k8s.io/kube-state-metrics/kube-state-metrics',
270+
],
182271
changelogUrl: 'https://github.com/kubernetes/kube-state-metrics',
183272
},
184273
{
185-
matchPackageNames: ['quay.io/brancz/kube-rbac-proxy'],
274+
matchPackageNames: [
275+
'quay.io/brancz/kube-rbac-proxy',
276+
],
186277
changelogUrl: 'https://github.com/brancz/kube-rbac-proxy',
187278
},
188279
],

0 commit comments

Comments
 (0)