func GetOriginalConfiguration(info *resource.Info) ([]byte, error) {
	annotations, err := info.Mapping.MetadataAccessor.Annotations(info.Object)
	if err != nil {
		return nil, err
	}
	if annotations == nil {
		return nil, nil
	}
	original, ok := annotations[LastAppliedConfigAnnotation]
	if !ok {
		return nil, nil
	}
	return []byte(original), nil
}
GetOriginalConfiguration retrieves the original configuration of the object
from the annotation, or nil if no annotation was found.
package kubectl
import (
	"encoding/json"
	"k8s.io/kubernetes/pkg/api/meta"
	"k8s.io/kubernetes/pkg/kubectl/resource"
	"k8s.io/kubernetes/pkg/runtime"
)
type debugError interface {
	DebugError() (msg string, args []interface{})
}
const LastAppliedConfigAnnotation = kubectlAnnotationPrefix + "last-applied-configuration"