WIP: Set proper InvolvedObject when using library-go EventRecorder#2891
WIP: Set proper InvolvedObject when using library-go EventRecorder#2891soltysh wants to merge 1 commit intoopenshift:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: soltysh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thanks, I missed this in #2833 |
| libgoRecorder: events.NewRecorder(kubeClient.CoreV1().Events("openshift-machine-config-operator"), "machine-config-operator", &corev1.ObjectReference{}), | ||
| queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "machineconfigoperator"), | ||
| libgoRecorder: events.NewRecorder(kubeClient.CoreV1().Events("openshift-machine-config-operator"), "machine-config-operator", &corev1.ObjectReference{ | ||
| Kind: "Deployment", |
There was a problem hiding this comment.
Is Kind always supposed to be Deployment even if we're using it to sync eg Custom Resource Definition? https://github.com/openshift/machine-config-operator/blob/master/pkg/operator/sync.go#L382
There was a problem hiding this comment.
it can be any resource that exists in the cluster, we usually do that in Run method and try to read this one out from a running pod like here https://github.com/openshift/library-go/blob/624c91f4e514cb29f235478042f1ac2e9ef20b93/pkg/operator/staticpod/installerpod/cmd.go#L406 but it's to also hardcode a particular parent resource. Like I said, I not fluent with how your operator works 😉 so you can just treat that as a pointer.
Yeah, feel free to pick it up and update as necessary, I just put it here so you can push this forward, if you're happy with the current shape feel free to tag it, I'll attach k8s bump PR with it since it popped up during debugging other things. |
|
@soltysh: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
Replaced with #2893 |
You'll need to set a proper
InvolvedObjectsuch that you won't too many events like:as you can observe for example in https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_kubernetes/1087/pull-ci-openshift-kubernetes-master-k8s-e2e-gcp-serial/1473408603632177152/artifacts/k8s-e2e-gcp-serial/gather-extra/artifacts/pods/openshift-machine-config-operator_machine-config-controller-789f46f7dc-mwsn2_machine-config-controller.log
/assign @kikisdeliveryservice @sinnykumari