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
Add pagination support for spire-server entry show
command
#3135
Add pagination support for spire-server entry show
command
#3135
Conversation
Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
cmd/spire-server/cli/entry/show.go
Outdated
@@ -15,6 +15,8 @@ import ( | |||
"golang.org/x/net/context" | |||
) | |||
|
|||
const listEntriesRequestPageSize = 1000 |
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.
I do not understand what size should be defined...
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.
That's a great question :) The benefit of paging the response is that in deployments with significant amounts of entries, we can exceed the gRPC message size limit (4MB). With 1000 entries, that gives us roughly 4K per entry, which seems reasonable except that SPIFFE ID's can technically be up to 2048 bytes each. I don't think we need to be too precise here. What if we just went for 500?
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.
Fix: ee8ea5d
Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
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.
Thanks, @ryysud !
…3135) Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
Signed-off-by: Ryuma Yoshida ryumyosh@zlab.co.jp
Pull Request check list
Affected functionality
spire-server entry show
command.Description of change
Pagination support for
spire-server entry show
command.Which issue this PR fixes
Fixes #2443.