diff --git a/internal/pkg/handler/upgrade.go b/internal/pkg/handler/upgrade.go index 51e702d8..724568e1 100644 --- a/internal/pkg/handler/upgrade.go +++ b/internal/pkg/handler/upgrade.go @@ -116,6 +116,7 @@ func PerformRollingUpgrade(clients kube.Clients, config util.Config, upgradeFunc if result != constants.Updated && annotationValue != "" { values := strings.Split(annotationValue, ",") for _, value := range values { + value = strings.Trim(value, " ") if value == config.ResourceName { result = updateContainers(upgradeFuncs, i, config, false) if result == constants.Updated { diff --git a/internal/pkg/testutil/kube.go b/internal/pkg/testutil/kube.go index 32100a64..1fb88377 100644 --- a/internal/pkg/testutil/kube.go +++ b/internal/pkg/testutil/kube.go @@ -821,6 +821,7 @@ func VerifyResourceUpdate(clients kube.Clients, config util.Config, envVarPostfi } else if annotationValue != "" { values := strings.Split(annotationValue, ",") for _, value := range values { + value = strings.Trim(value, " ") if value == config.ResourceName { matches = true break