From 3c4416387595115530532ec983ce28db91f809d8 Mon Sep 17 00:00:00 2001 From: void404 Date: Tue, 23 Jan 2024 09:44:17 +0100 Subject: [PATCH] Fix dry-run label --- controllers/compassmanager_controller.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/controllers/compassmanager_controller.go b/controllers/compassmanager_controller.go index 2502a53..ca2c9c1 100644 --- a/controllers/compassmanager_controller.go +++ b/controllers/compassmanager_controller.go @@ -554,7 +554,9 @@ func (c *ControlPlaneInterface) UpsertCompassMapping(name types.NamespacedName, labels[LabelGlobalAccountID] = kymaCR.Labels[LabelGlobalAccountID] labels[LabelSubaccountID] = kymaCR.Labels[LabelSubaccountID] labels[LabelManagedBy] = ManagedBy - labels[LabelDryRun] = "Yes" + if c.dry { + labels[LabelDryRun] = "Yes" + } existingMapping, err := c.GetCompassMapping(name) @@ -597,7 +599,9 @@ func (c *ControlPlaneInterface) CreateCompassMapping(name types.NamespacedName, labels[LabelGlobalAccountID] = kymaCR.Labels[LabelGlobalAccountID] labels[LabelSubaccountID] = kymaCR.Labels[LabelSubaccountID] labels[LabelManagedBy] = ManagedBy - labels[LabelDryRun] = "Yes" + if c.dry { + labels[LabelDryRun] = "Yes" + } newMapping := v1beta1.CompassManagerMapping{} newMapping.Name = name.Name