Skip to content

Commit

Permalink
Update images/kube-api-proxy/pkg/rewriter/rule_rewriter.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Mikheykin <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
  • Loading branch information
yaroslavborbat and diafour committed Jun 17, 2024
1 parent cc8445a commit 9adc6e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion images/kube-api-proxy/pkg/rewriter/rule_rewriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ func (rw *RuleBasedRewriter) rewriteLabelSelector(rawQuery string) string {
labels := make(map[string]string, len(listLabels))
for _, l := range listLabels {
ll := strings.Split(l, "=")
labels[ll[0]] = ll[1]
if (len(ll)>1) {
labels[ll[0]] = ll[1]
} else {
labels[ll[0]] = ""
}
}
labels = rw.Rules.RenameLabels(labels)
count := 0
Expand Down

0 comments on commit 9adc6e6

Please sign in to comment.