-
Notifications
You must be signed in to change notification settings - Fork 28
Added EventRecorder to the Controller #101
Added EventRecorder to the Controller #101
Conversation
Hi @shanduur. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Mateusz Urbanek <[email protected]>
c255857
to
e40e69f
Compare
Signed-off-by: Mateusz Urbanek <[email protected]>
Signed-off-by: Mateusz Urbanek <[email protected]>
999905d
to
8a30877
Compare
Signed-off-by: Mateusz Urbanek <[email protected]>
Co-authored-by: Blaine Gardner <[email protected]> Signed-off-by: Mateusz Urbanek <[email protected]>
9e4f208
to
6376b6e
Compare
bdb5dac
to
6376b6e
Compare
Signed-off-by: Mateusz Urbanek <[email protected]>
Signed-off-by: Mateusz Urbanek <[email protected]>
35b6313
to
a54e178
Compare
Signed-off-by: Mateusz Urbanek <[email protected]>
Signed-off-by: Mateusz Urbanek <[email protected]>
93ac92f
to
cc5b09d
Compare
Signed-off-by: Mateusz Urbanek <[email protected]>
cc5b09d
to
2e33d55
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.
I'm curious why some errors log but don't record events, and there is one error that records an event but doesn't log. Would it be better to wrap the provisionBucketClaimOperation()
in a function that automatically handles logging and event recording when there is any error provisioning a bucket?
@@ -153,9 +160,12 @@ func (b *bucketClaimListener) provisionBucketClaimOperation(ctx context.Context, | |||
} | |||
|
|||
bucketClass, err := b.bucketClasses().Get(ctx, bucketClassName, metav1.GetOptions{}) | |||
if err != nil { | |||
if kubeerrors.IsNotFound(err) { |
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'm not sure if IsNotFound()
handles the nil case. Would it be better for this to be something like below, or am I missing something?
if err != nil {
if kubeerrors.IsNotFound(err) {
b.recordEvent( ... )
}
klog.V(3)....
return err
}
Signed-off-by: Mateusz Urbanek <[email protected]>
/ok-to-test |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BlaineEXE, shanduur 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 |
/lgtm |
During one of the SIG-Storage COSI meetings in February we discussed adding Event recording capabilities.
This is 2nd out of 3 pull requests across all repos (api/controller/provisioner-sidecar) with implementation of those changes.
Ref: