-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Integration Discovery Rules: endpoint that returns all the rules #49514
Conversation
3b3425d
to
2feaecc
Compare
|
||
ret.NextKey = nextToken | ||
|
||
if nextToken == "" || len(ret.Rules) > maxPerPage { |
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.
So I suppose it can fetch more rules than maxPerPage
, but I assume we're okay with that?
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.
Yeah, I think so.
This works as a soft limit.
Otherwise, we might need to stop adding elements in the middle of the loop, which would turn the nextToken
something composed of the DiscoveryConfig
previous nextToken
and some other value indicating where we stopped (some index).
2feaecc
to
83e6a93
Compare
This PR adds a new endpoint that returns all the discovery rules that exist for a given Integration. It will include what was the last time the rule was used to fetch resources, so that users can see stale rules and act upon it. The endpoint supports filtering by the resource type to ensure the UI only requests a subset of the rules, depending on the screen the user is visiting (eg, EC2, RDS or EKS).
83e6a93
to
4568fb7
Compare
@kiosion Can you please take a lookg when you get a chance? |
@marcoandredinis See the table below for backport results.
|
) * Integration Discovery Rules: endpoint that returns all the rules This PR adds a new endpoint that returns all the discovery rules that exist for a given Integration. It will include what was the last time the rule was used to fetch resources, so that users can see stale rules and act upon it. The endpoint supports filtering by the resource type to ensure the UI only requests a subset of the rules, depending on the screen the user is visiting (eg, EC2, RDS or EKS). * use discovery rule
) (#49869) * Integration Discovery Rules: endpoint that returns all the rules This PR adds a new endpoint that returns all the discovery rules that exist for a given Integration. It will include what was the last time the rule was used to fetch resources, so that users can see stale rules and act upon it. The endpoint supports filtering by the resource type to ensure the UI only requests a subset of the rules, depending on the screen the user is visiting (eg, EC2, RDS or EKS). * use discovery rule
This PR adds a new endpoint that returns all the discovery rules that exist for a given Integration.
It will include what was the last time the rule was used to fetch resources, so that users can see stale rules and act upon it.
The endpoint supports filtering by the resource type to ensure the UI only requests a subset of the rules, depending on the screen the user is visiting (eg, EC2, RDS or EKS).
Demo:
curl ... 'https://proxy.example.com/v1/webapi/sites/my-cluster/integrations/teleportdev/discoveryrules'