We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
r.Recorder.Eventf()
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
/kind feature
Current the code uses record.Eventf() (or Warnf()), which uses the cluster-api package record.
record.Eventf()
record
The code of Cluster-API does not use that anymore, and the kubebuilder docs align to the cluster-api code:
Each Reconciler has a field "Record" which gets used to create the events:
if err = (&controller.MyKindReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("mykind-controller"), // <<<=== }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "MyKind") os.Exit(1) }
Docs: https://book.kubebuilder.io/reference/raising-events
Currently, it is too difficult to get the events in unit-tests. After that change, we can easily overwrite the Recorder in tests.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
/kind feature
Current the code uses
record.Eventf()
(or Warnf()), which uses the cluster-api packagerecord
.The code of Cluster-API does not use that anymore, and the kubebuilder docs align to the cluster-api code:
Each Reconciler has a field "Record" which gets used to create the events:
Docs: https://book.kubebuilder.io/reference/raising-events
Currently, it is too difficult to get the events in unit-tests. After that change, we can easily overwrite the Recorder in tests.
The text was updated successfully, but these errors were encountered: