func Warnf(object runtime.Object, reason, message string, args ...interface{}) {
	defaultRecorder.Eventf(object, corev1.EventTypeWarning, strings.Title(reason), message, args...)
}
Warnf is just like Warn, but with Sprintf for the message field.
package record
import (
	"strings"
	"sync"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/client-go/tools/record"
)
var (
	initOnce        sync.Once
	defaultRecorder record.EventRecorder
)
func init() {
	defaultRecorder = new(record.FakeRecorder)
}
func InitFromRecorder(recorder record.EventRecorder) {
	initOnce.Do(func() {
		defaultRecorder = recorder
	})
}
func Event(object runtime.Object, reason, message string) {
	defaultRecorder.Event(object, corev1.EventTypeNormal, strings.Title(reason), message)
}
func Eventf(object runtime.Object, reason, message string, args ...interface{}) {
	defaultRecorder.Eventf(object, corev1.EventTypeNormal, strings.Title(reason), message, args...)
}
func Warn(object runtime.Object, reason, message string) {
	defaultRecorder.Event(object, corev1.EventTypeWarning, strings.Title(reason), message)
}