From 58a17d977f9576f1d6e9ecf4f6833ce8a57d63d4 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Thu, 31 Oct 2024 12:12:49 +0100 Subject: [PATCH] chore: fix pg_store Signed-off-by: Mike Beaumont --- pkg/plugins/resources/postgres/pq_store.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/plugins/resources/postgres/pq_store.go b/pkg/plugins/resources/postgres/pq_store.go index 23159a985b75..ba7d701c69b5 100644 --- a/pkg/plugins/resources/postgres/pq_store.go +++ b/pkg/plugins/resources/postgres/pq_store.go @@ -110,7 +110,11 @@ func (r *postgresResourceStore) Update(_ context.Context, resource core_model.Re return errors.Wrap(err, "failed to convert meta version to int") } - labels, err := prepareLabels(opts.Labels) + updateLabels := resource.GetMeta().GetLabels() + if opts.ModifyLabels { + updateLabels = opts.Labels + } + labels, err := prepareLabels(updateLabels) if err != nil { return err }