Compare commits

..

3 Commits

Author SHA1 Message Date
Peggie
871850a372
Merge 0eddca84c4 into bb7845dd62 2026-06-08 13:31:34 +02:00
Peggie
0eddca84c4 chore(main): release 0.13.0
Signed-off-by: Peggie <info@cloudnative-pg.io>
2026-06-08 13:31:27 +02:00
Niccolò Fei
bb7845dd62
fix(scheme): register meta types for CNPG scheme group version (#943)
Some checks failed
release-please / release-please (push) Failing after 5s
After the controller-runtime v0.24.0 upgrade (58f4fed), the instance
sidecar logged "v1.GetOptions is not suitable for converting to
postgresql.cnpg.io/v1" on every WAL archive, which broke retention
policy enforcement.

Register the standard meta types with metav1.AddToGroupVersion after the
AddKnownTypes call in internal/cnpgi/common/scheme.go and
internal/scheme/cnpg.go.

Closes #942

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
2026-06-08 11:08:15 +02:00
3 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,7 @@
* **deps:** Update module sigs.k8s.io/controller-runtime to v0.24.0 ([#880](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/880)) ([58f4fed](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/58f4fed40ba788f76f706e148bebf1892a2dd609)) * **deps:** Update module sigs.k8s.io/controller-runtime to v0.24.0 ([#880](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/880)) ([58f4fed](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/58f4fed40ba788f76f706e148bebf1892a2dd609))
* **deps:** Update module sigs.k8s.io/controller-runtime to v0.24.1 ([#910](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/910)) ([9be87b0](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/9be87b0d9c87c0df7f1f72caa33bf848fbc16582)) * **deps:** Update module sigs.k8s.io/controller-runtime to v0.24.1 ([#910](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/910)) ([9be87b0](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/9be87b0d9c87c0df7f1f72caa33bf848fbc16582))
* **docs:** Update broken link to CloudNativePG documentation ([#904](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/904)) ([43f92fb](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/43f92fbcf1f57d95bbca22cb63c9697d75fc0dbc)), closes [#729](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/729) * **docs:** Update broken link to CloudNativePG documentation ([#904](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/904)) ([43f92fb](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/43f92fbcf1f57d95bbca22cb63c9697d75fc0dbc)), closes [#729](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/729)
* **scheme:** Register meta types for CNPG scheme group version ([#943](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/943)) ([bb7845d](https://github.com/cloudnative-pg/plugin-barman-cloud/commit/bb7845dd621115026744c9f1b32cb2fd0cb4a729)), closes [#942](https://github.com/cloudnative-pg/plugin-barman-cloud/issues/942)
## [0.12.0](https://github.com/cloudnative-pg/plugin-barman-cloud/compare/v0.11.0...v0.12.0) (2026-04-13) ## [0.12.0](https://github.com/cloudnative-pg/plugin-barman-cloud/compare/v0.11.0...v0.12.0) (2026-04-13)

View File

@ -25,6 +25,7 @@ import (
cnpgv1 "github.com/cloudnative-pg/cloudnative-pg/api/v1" cnpgv1 "github.com/cloudnative-pg/cloudnative-pg/api/v1"
"github.com/cloudnative-pg/machinery/pkg/log" "github.com/cloudnative-pg/machinery/pkg/log"
"github.com/spf13/viper" "github.com/spf13/viper"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime"
@ -58,6 +59,7 @@ func GenerateScheme(ctx context.Context) *runtime.Scheme {
&cnpgv1.Backup{}, &cnpgv1.BackupList{}, &cnpgv1.Backup{}, &cnpgv1.BackupList{},
&cnpgv1.ScheduledBackup{}, &cnpgv1.ScheduledBackupList{}, &cnpgv1.ScheduledBackup{}, &cnpgv1.ScheduledBackupList{},
) )
metav1.AddToGroupVersion(result, schemeGroupVersion)
schemeLog := log.FromContext(ctx) schemeLog := log.FromContext(ctx)
schemeLog.Info("CNPG types registration", "schemeGroupVersion", schemeGroupVersion) schemeLog.Info("CNPG types registration", "schemeGroupVersion", schemeGroupVersion)

View File

@ -25,6 +25,7 @@ import (
cnpgv1 "github.com/cloudnative-pg/cloudnative-pg/api/v1" cnpgv1 "github.com/cloudnative-pg/cloudnative-pg/api/v1"
"github.com/cloudnative-pg/machinery/pkg/log" "github.com/cloudnative-pg/machinery/pkg/log"
"github.com/spf13/viper" "github.com/spf13/viper"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
) )
@ -49,6 +50,7 @@ func AddCNPGToScheme(ctx context.Context, s *runtime.Scheme) {
&cnpgv1.Backup{}, &cnpgv1.BackupList{}, &cnpgv1.Backup{}, &cnpgv1.BackupList{},
&cnpgv1.ScheduledBackup{}, &cnpgv1.ScheduledBackupList{}, &cnpgv1.ScheduledBackup{}, &cnpgv1.ScheduledBackupList{},
) )
metav1.AddToGroupVersion(s, schemeGroupVersion)
log.FromContext(ctx).Info("CNPG types registration", "schemeGroupVersion", schemeGroupVersion) log.FromContext(ctx).Info("CNPG types registration", "schemeGroupVersion", schemeGroupVersion)
} }