Skip to content
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

connect: Add support for ConsulResolver to specifies a filter expression #15659

Merged
merged 6 commits into from
Dec 14, 2022
Merged

connect: Add support for ConsulResolver to specifies a filter expression #15659

merged 6 commits into from
Dec 14, 2022

Conversation

pierluc-codes
Copy link
Contributor

Description

Add Filter to ConsulResolver to be able to specifies an expression for filtering the query results.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • not a security concern

I don't know how secure is hashicorp/go-bexpr

@github-actions github-actions bot added the theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies label Dec 2, 2022
@pierluc-codes pierluc-codes changed the title Enable consul_resolver to filter connect: Add support for ConsulResolver to specifies a filter expression Dec 2, 2022
@pierluc-codes pierluc-codes marked this pull request as ready for review December 5, 2022 21:27
@vercel
Copy link

vercel bot commented Dec 5, 2022

@pierluc-codes is attempting to deploy a commit to the HashiCorp Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@banks banks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, Thanks for contributing!

I have one minor optional suggestion inline but fine to merge as is!

Comment on lines 71 to 73
Tags: []string{
"test-tag",
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we view tags as a semi-deprecated construct in Consul registrations - everything that can be done with tag can also be done with Meta and Filter. Long term we'd like to consolidate on just Meta but have never been able to prioritize the one or two places (e.g. DNS) where tags still do something that Meta doesn't currently.

So I'd accept this - it's not wrong and we've not officially announced or documented that "tags" are deprecated, but it is for example the reason we don't support tag filters in connect endpoints etc.

Would you be open to writing this test using Meta instead? It's not a huge deal either way, but internally we'd tend towards supporting/encouraging use of meta of tags as we might one day get around to deprecating and removing tags entirely!

@pierluc-codes pierluc-codes closed this by deleting the head repository Dec 13, 2022
@pierluc-codes pierluc-codes reopened this Dec 13, 2022
@curtbushko curtbushko self-requested a review December 13, 2022 21:27
Copy link
Contributor

@curtbushko curtbushko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-inactive/1.14 This release series is no longer active theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants