Skip to content

Commit

Permalink
Actually use sorted keys
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Nov 24, 2021
1 parent 3bd14b8 commit 4987e79
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 4987e79

Please sign in to comment.