Skip to content

Commit

Permalink
Merge pull request #2366 from replicatedhq/divolgin/fix-test
Browse files Browse the repository at this point in the history
Actually use sorted keys
  • Loading branch information
divolgin committed Nov 24, 2021
2 parents 3bd14b8 + 4987e79 commit bcc6168
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/operator/client/deploy.go
Expand Up @@ -671,8 +671,8 @@ func getLabelSelector(appLabelSelector *metav1.LabelSelector) string {
sort.Strings(allKeys)

allLabels := make([]string, 0)
for key, val := range appLabelSelector.MatchLabels {
allLabels = append(allLabels, fmt.Sprintf("%s=%s", key, val))
for _, key := range allKeys {
allLabels = append(allLabels, fmt.Sprintf("%s=%s", key, appLabelSelector.MatchLabels[key]))
}

return strings.Join(allLabels, ",")
Expand Down

0 comments on commit bcc6168

Please sign in to comment.