From e73907a32dc3d89e399887d2ffd07fa60a1a9fc6 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Fri, 10 Apr 2026 18:11:47 +0200 Subject: [PATCH 1/2] fix(e2e): use correct image name in kustomize overlay Closes #840 The e2e kustomize overlay matches docker.io/library/plugin-barman-cloud but the base kustomization at kubernetes/kustomization.yaml matches the bare plugin-barman-cloud name from kubernetes/deployment.yaml and replaces it with the GHCR image. Since the overlay name never matches, the locally-built image is never deployed and e2e tests always run against the main branch code from GHCR. Use the bare image name so the overlay rule overrides the base rule. Broken since b7daaac (#89) changed the base kustomization's newName from docker.io/library/plugin-barman-cloud to the GHCR image without updating the e2e overlay. Signed-off-by: Marco Nenciarini --- test/e2e/e2e_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 4d62e025..07948b64 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -59,7 +59,7 @@ var _ = SynchronizedBeforeSuite(func(ctx SpecContext) []byte { Resources: []string{barmanCloudKustomizationPath}, Images: []kustomizeTypes.Image{ { - Name: "docker.io/library/plugin-barman-cloud", + Name: "plugin-barman-cloud", NewName: "registry.barman-cloud-plugin:5000/plugin-barman-cloud", NewTag: "testing", }, From 45c00469464ded44820770bc8bb44982ecff1f5c Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Fri, 10 Apr 2026 18:11:47 +0200 Subject: [PATCH 2/2] fix(e2e): use correct image name in kustomize overlay The e2e kustomize overlay tried to match docker.io/library/plugin-barman-cloud but the base kustomization at kubernetes/kustomization.yaml already transforms the bare plugin-barman-cloud image to the GHCR name. The overlay must match the base's output (ghcr.io/cloudnative-pg/plugin-barman-cloud-testing) to override it. Add comments on both sides to prevent future drift. Broken since b7daaac (#89) changed the base kustomization's newName from docker.io/library/plugin-barman-cloud to the GHCR image without updating the e2e overlay. Closes #840 Signed-off-by: Marco Nenciarini --- kubernetes/kustomization.yaml | 1 + test/e2e/e2e_suite_test.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kubernetes/kustomization.yaml b/kubernetes/kustomization.yaml index b4ebc9e3..eda8b8c4 100644 --- a/kubernetes/kustomization.yaml +++ b/kubernetes/kustomization.yaml @@ -9,6 +9,7 @@ resources: - service.yaml - ../config/crd - ../config/rbac +# If you change newName, update the e2e overlay in test/e2e/e2e_suite_test.go too. images: - name: plugin-barman-cloud newName: ghcr.io/cloudnative-pg/plugin-barman-cloud-testing diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 07948b64..64fae91a 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -57,9 +57,11 @@ var _ = SynchronizedBeforeSuite(func(ctx SpecContext) []byte { const barmanCloudKustomizationPath = "./kustomize/kubernetes/" barmanCloudKustomization := &kustomizeTypes.Kustomization{ Resources: []string{barmanCloudKustomizationPath}, + // Override the image from the base kustomization (kubernetes/kustomization.yaml) + // with the locally-built one. The Name must match the newName in the base. Images: []kustomizeTypes.Image{ { - Name: "plugin-barman-cloud", + Name: "ghcr.io/cloudnative-pg/plugin-barman-cloud-testing", NewName: "registry.barman-cloud-plugin:5000/plugin-barman-cloud", NewTag: "testing", },