Cope with pagination in private zone discovery#99
Conversation
Commit 8fdcf1a changed the DNS private zone discovery to use the GetResources AWS API call. However, even though we use filters, the resources are still paginated as though no filter were applied. If the desired resource is not on the first page, then GetResources will not return it. We need to use GetResourcesPages, and we may need to look through one or more empty pages of resources till we find the desired resource. * pkg/dns/aws/dns.go: Use GetResourcesPages to get the private zone.
8faf3bb to
2526a4c
Compare
|
I haven't had time to go through the diff in detail, but |
|
Thanks! I actually @'d you because I saw you had mentioned on an installer PR that you were following the example in this code, but now that I actually look at that PR, I see you are already using |
|
I was riding on the "now we need the get-tagged-resources permission" coat tails ;). |
|
/retest |
and /retest |
and /retest |
|
/retest |
/retest |
| }) | ||
| }, f) | ||
| if innerError != nil { | ||
| err = innerError |
There was a problem hiding this comment.
If both err and innerError are not nil, err is lost. I don't want to block the PR on it. How about a followup to use an aggregate (either from k8s utils if available, or https://github.com/pkg/errors?)
There was a problem hiding this comment.
I figured innerError was more important, but yeah, aggregating the error values would be best. I'll make a follow-up.
|
Thank you very much! /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou, Miciah The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#93 changed the DNS private zone discovery to use the
GetResourcesAWS API call. However, even though we use filters, the resources are still paginated as though no filter were applied. If the desired resource is not on the first page, thenGetResourceswill not return it. We need to useGetResourcesPages, and we may need to look through one or more empty pages of resources till we find the desired resource.pkg/dns/aws/dns.go: UseGetResourcesPagesto get the private zone.@ironcladlou @wking