postgres-containers
postgres-containers copied to clipboard
Renovate config for standard images
I have migrated a first cluster to the standard image ghcr.io/cloudnative-pg/postgresql:17.5-202507210807-standard-bookworm
Today a new version was published 17.5-202507280807-standard-bookworm but it wasn't picked up by my Renovate job.
I have been struggling all evening but have failed to create a new working Renovate config for these new images. Did anybody succeed?
Here's my old customManager which worked for the legacy syntax.
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
customManagers: [
{
customType: 'regex',
description: ["Process CloudnativePG Postgresql version"],
fileMatch: ["(^|/)kubernetes/.+\\.ya?ml$"],
matchStrings: ["imageName: (?<depName>ghcr\\.io/cloudnative-pg/postgresql):(?<currentValue>.*\\-.*)"],
datasourceTemplate: 'docker',
versioningTemplate: 'redhat'
}
]
}
I'm also very interested. The new scheme used is interesting but hard to configure.
Just started also looking into it and I think it doesn't pick it up because of the versioningTemplate. It seems that redhat versioning doesn't support multiple -
I think the best idea is to use a custom regex for versioning. I'll try to come up with something 🙂
This works 🥳
{
// cloudnative-pg instance version
customType: 'regex',
managerFilePatterns: [
'/\\.yaml$/',
],
matchStrings: [
'imageName: (?<depName>\\S+):(?<currentValue>.*\\-.*)@(?<currentDigest>sha256:[a-f0-9]+)',
],
datasourceTemplate: 'docker',
// matches: 17.6-202509151215-standard-trixie
versioningTemplate: 'regex:^(?<major>\\d+)\\.(?<minor>\\d+)-(?<patch>\\d+)-(?<compatibility>.*)$',
},
(The actual important thing is the versioningTemplate)
Keep in mind that updating to a newer debian release must be done manually, as renovate will never touch the "compatibility" part of the version string.
do you want to add it to the README or add it as a file to project as a contribution?
Thanks @DerRockWolf , this does indeed work!
@gbartolini I would suggest to put it into the README
I am reopening so that @DerRockWolf can propose a PR.
Done 🙂 https://github.com/cloudnative-pg/postgres-containers/pull/330