-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support listing works with its labels #135
Conversation
2af893b
to
d80a6e1
Compare
lgtm Once merged, I can test it against the client I am building. |
} | ||
|
||
notEqualsLabels = append(notEqualsLabels, fmt.Sprintf(`payload->'metadata'->'labels'->>'%s'<>'%s'`, | ||
requirement.Key(), values.List()[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe extract payload->'metadata'->'labels'
as a constant since it is using in many places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
labelSearch = append(labelSearch, notEqualsLabels...) | ||
labelSearch = append(labelSearch, existsKeys...) | ||
labelSearch = append(labelSearch, doesNotExistKeys...) | ||
return labelSelector, strings.Join(labelSearch, " and "), true, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does kube label selector support or
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it does not
Signed-off-by: Wei Liu <[email protected]>
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just an FYI; I've tested the PR with a code similar to this
and works as expected. Thanks @skeeey @clyang82 @qiujian16 |
No description provided.