func ResourceNameFor(mapper meta.RESTMapper, o runtime.Object) string {
	gvk := o.GetObjectKind().GroupVersionKind()
	mapping, err := mapper.RESTMapping(gvk.GroupKind(), gvk.Version)
	if err != nil {
		log.Debugf("RESTMapper failed for %s: %s, falling back to kind", gvk, err)
		return strings.ToLower(gvk.Kind)
	}

	return mapping.Resource.Resource
}
func ResourceNameFor(mapper meta.RESTMapper, o runtime.Object) string {
	gvk := o.GetObjectKind().GroupVersionKind()
	mapping, err := mapper.RESTMapping(gvk.GroupKind(), gvk.Version)
	if err != nil {
		log.Debugf("RESTMapper failed for %s: %s, falling back to kind", gvk, err)
		return strings.ToLower(gvk.Kind)
	}

	return mapping.Resource.Resource
}
// ResourceNameFor returns a lowercase plural form of a type, for
// human messages.  Returns lowercased kind if discovery lookup fails.