-
Notifications
You must be signed in to change notification settings - Fork 80
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 option for custom status readers #383
Add option for custom status readers #383
Conversation
This commit adds the `CustomStatusReadersFactoryFunc` option to the StatusPoller's `Poll` method options so that consumers can provide custom status readers for certain GroupKinds (esp. CRDs). It also changes the `NewGenericStatusReader` func so that it accepts a statusFunc parameter so that consumers only have to implement that single func and use the genericStatusReader for all the boilerplate stuff (like fetching an object from the API). refs kubernetes-sigs#382
1b9ed40
to
5b7b824
Compare
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.
Supporting custom status readers has been the plan since the beginning, we just haven't had time to do it. This is a good change. I just have a few small comments.
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: makkes, mortent The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This commit adds the
CustomStatusReadersFactoryFunc
option to theStatusPoller's
Poll
method options so that consumers can providecustom status readers for certain GroupKinds (esp. CRDs).
It also changes the
NewGenericStatusReader
func so that it accepts astatusFunc parameter so that consumers only have to implement that
single func and use the genericStatusReader for all the boilerplate
stuff (like fetching an object from the API).
refs #382