Update matchLabels in LabelSelectors

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2022-02-07 11:30:21 +01:00
parent a7f997c092
commit fe7615afb4
+5
View File
@@ -489,6 +489,11 @@ func (c *DeploymentController) appendPrimarySuffixToValuesIfNeeded(labelSelector
}
}
}
for key, value := range labelSelector.MatchLabels {
if contains(c.labels, key) {
labelSelector.MatchLabels[key] = value + "-primary"
}
}
}
}