renovate.json5
Rama main · réplica de lectura del repositorio original.
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
],
kubernetes: {
managerFilePatterns: [
'/k8s/manifests/.+\\.yaml$/',
],
},
hostRules: [
{
matchHost: "repology.org",
abortOnError: false,
maxRequestsPerSecond: 1,
concurrentRequestLimit: 1,
timeout: 180000,
}
],
flux: {
managerFilePatterns: [
'/k8s/manifests/.+\\.yaml$/',
],
},
terraform: {
managerFilePatterns: [
'/\\.tf$/',
],
},
packageRules: [
{
matchDatasources: ["helm"],
matchPackageNames: ["kube-prometheus-stack"],
schedule: ["* 0 * * 0"],
}
],
customManagers: [
{
customType: "jsonata",
description: "Update CloudNativePG Cluster image references",
fileFormat: "yaml",
managerFilePatterns: ["/\\.ya?ml$/"],
matchStrings: [
"$[kind = 'Cluster'].spec.imageName.($match($, /^([^:]+):([^\\s@]+)(?:@(sha256:[a-f0-9]+))?/)[0].groups{ 'depName': $[0], 'currentValue': $string($[1]), 'currentDigest': $[2] })",
],
datasourceTemplate: "docker",
versioningTemplate: "docker",
},
{
customType: "jsonata",
description: "Update CloudNativePG Cluster image references",
fileFormat: "yaml",
managerFilePatterns: ["/\\.ya?ml$/"],
matchStrings: [
"$[kind = 'Cluster'].spec.postgresql.extensions.image.reference.($match($, /^([^:]+):([^\\s@]+)(?:@(sha256:[a-f0-9]+))?/)[0].groups{ 'depName': $[0], 'currentValue': $string($[1]), 'currentDigest': $[2] })",
],
datasourceTemplate: "docker",
versioningTemplate: "regex:^pg(?<major>\\d+)-v((?<minor>\\d+))\\.((?<patch>\\d+))\\.((?<build>\\d+))$",
},
{
customType: "jsonata",
description: "Update versioned apko packages via Repology",
fileFormat: "yaml",
managerFilePatterns: ["/^images/[^/]+\\.ya?ml$/"],
matchStrings: [
"contents.packages[$not($contains($, /@local$/))].{ 'depName': 'alpine_' & $replace($match($$.contents.repositories[0], /alpine\\/(v\\d+\\.\\d+|edge)/)[0].groups[0], '.', '_') & '/' & $substringBefore($, '='), 'currentValue': $string($substringAfter($, '=')) }[currentValue != depName]",
],
datasourceTemplate: "repology",
versioningTemplate: "loose",
},
{
customType: "jsonata",
description: "Update local apko packages via custom datasource",
fileFormat: "yaml",
managerFilePatterns: ["/^images/[^/]+\\.ya?ml$/"],
matchStrings: [
"contents.packages[$contains($, /@local$/)].{ 'depName': $substringBefore($, '='), 'currentValue': $string($match($substringAfter($, '='), /(.+)@local/)[0].groups[0]) }[currentValue != depName]",
],
datasourceTemplate: "custom.melange",
versioningTemplate: "loose",
},
{
customType: "jsonata",
description: "Update melange versions when fetching GH release artifacts",
fileFormat: "yaml",
managerFilePatterns: ["/^images/packages/[^/]+/melange\\.ya?ml$/"],
matchStrings: [
"pipeline[uses = 'fetch'].with[$contains(uri, 'https://github.com') and $contains(uri, '/releases/download/v${{package.version}}')].{'depName': $match(uri, /https:\\/\\/github\\.com\\/([^\\/]+\\/[^\\/]+)\\//).groups[0], 'currentValue': $string($$.package.version) }",
],
datasourceTemplate: "github-releases",
},
{
customType: "jsonata",
description: "Update melange versions when using git-checkout",
fileFormat: "yaml",
managerFilePatterns: ["/^images/packages/[^/]+/melange\\.ya?ml$/"],
matchStrings: [
"pipeline[uses = 'git-checkout'].with[$contains(repository, 'https://github.com') and $contains(tag, 'v${{package.version}}')].{'depName': $match(repository, /https:\\/\\/github\\.com\\/([^\\/]+\\/[^\\/]+)$/).groups[0], 'currentValue': $string($$.package.version) }",
],
datasourceTemplate: "github-releases",
},
{
customType: "jsonata",
description: "Update Github URLs in Kustomizations",
fileFormat: "yaml",
managerFilePatterns: ["/\\.ya?ml$/"],
matchStrings: [
"$[kind = 'Kustomization'].resources.($match($, /^https:\\/\\/github\\.com\\/([^/]+/[^/]+)\\/releases\\/download\\/(v?[\\d\\.]+)/)[0].groups{ 'depName': $[0], 'currentValue': $string($[1]) })",
],
datasourceTemplate: "github-releases",
},
{
customType: "jsonata",
description: "Update my CRD InjectTZ image references",
fileFormat: "yaml",
managerFilePatterns: ["/\\.ya?ml$/"],
matchStrings: [
"$[kind = 'InjectTZ'].spec.zoneinfoImageRef.($match($, /^([^:]+):([^\\s@]+)(?:@(sha256:[a-f0-9]+))?/)[0].groups{ 'depName': $[0], 'currentValue': $string($[1]), 'currentDigest': $[2] })",
],
datasourceTemplate: "docker",
versioningTemplate: "loose",
},
],
customDatasources: {
melange: {
defaultRegistryUrlTemplate: "file://images/packages/{{packageName}}/melange.yaml",
format: "yaml",
transformTemplates: [
"{ \"releases\": [ { \"version\": $.package.version } ] }",
],
},
},
}