Trim spaces in annotation list (#165)

* strip whitespace

* only trim spaces
This commit is contained in:
Júlia Biró
2020-09-22 15:29:29 +02:00
committed by GitHub
parent 503e357349
commit ed6ea026a8
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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 {
+1
View File
@@ -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