func (m KubeImageMutators) GetImageReferenceMutator(obj, old runtime.Object) (ImageReferenceMutator, error) {
	oldAnnotations, _ := m.GetAnnotationAccessor(old)
	annotations, _ := m.GetAnnotationAccessor(obj)
	resolveAnnotationChanged := ResolveAllNames(annotations) != ResolveAllNames(oldAnnotations)

	if spec, path, err := GetPodSpec(obj); err == nil {
		var oldSpec *kapi.PodSpec
		if old != nil {
			oldSpec, _, err = GetPodSpec(old)
			if err != nil {
				return nil, fmt.Errorf("old and new pod spec objects were not of the same type %T != %T: %v", obj, old, err)
			}
		}
		return NewPodSpecMutator(spec, oldSpec, path, resolveAnnotationChanged), nil
	}
	if spec, path, err := GetPodSpecV1(obj); err == nil {
		var oldSpec *kapiv1.PodSpec
		if old != nil {
			oldSpec, _, err = GetPodSpecV1(old)
			if err != nil {
				return nil, fmt.Errorf("old and new pod spec objects were not of the same type %T != %T: %v", obj, old, err)
			}
		}
		return NewPodSpecV1Mutator(spec, oldSpec, path, resolveAnnotationChanged), nil
	}
	return nil, errNoImageMutator
}
// GetImageReferenceMutator returns a mutator for the provided object, or an error if no
// such mutator is defined. Only references that are different between obj and old will
// be returned unless old is nil.
GetImageReferenceMutator returns a mutator for the provided object, or an error if no
such mutator is defined. Only references that are different between obj and old will
be returned unless old is nil.
// GetImageReferenceMutator returns a mutator for the provided object or an error if no // such mutator is defined . Only references that are different between obj and old will // be returned unless old is nil .
func (m KubeImageMutators) GetImageReferenceMutator(obj, old runtime.Object) (ImageReferenceMutator, error) {
	oldAnnotations, _ := m.GetAnnotationAccessor(old)
	annotations, _ := m.GetAnnotationAccessor(obj)
	resolveAnnotationChanged := ResolveAllNames(annotations) != ResolveAllNames(oldAnnotations)
	if spec, path, err := GetPodSpec(obj); err == nil {
		var oldSpec *kapi.PodSpec
		if old != nil {
			oldSpec, _, err = GetPodSpec(old)
			if err != nil {
				return nil, fmt.Errorf("old and new pod spec objects were not of the same type %T != %T: %v", obj, old, err)
			}
		}
		return NewPodSpecMutator(spec, oldSpec, path, resolveAnnotationChanged), nil
	}
	if spec, path, err := GetPodSpecV1(obj); err == nil {
		var oldSpec *kapiv1.PodSpec
		if old != nil {
			oldSpec, _, err = GetPodSpecV1(old)
			if err != nil {
				return nil, fmt.Errorf("old and new pod spec objects were not of the same type %T != %T: %v", obj, old, err)
			}
		}
		return NewPodSpecV1Mutator(spec, oldSpec, path, resolveAnnotationChanged), nil
	}
	return nil, errNoImageMutator
}
func ( m KubeImageMutators ) GetImageReferenceMutator ( obj , old runtime . Object ) ( ImageReferenceMutator , error ) { oldAnnotations , _ := m . GetAnnotationAccessor ( old ) annotations , _ := m . GetAnnotationAccessor ( obj ) resolveAnnotationChanged := ResolveAllNames ( annotations ) != ResolveAllNames ( oldAnnotations ) if spec , path , err := GetPodSpec ( obj ) ; err == nil { var oldSpec * kapi . PodSpec if old != nil { oldSpec , _ , err = GetPodSpec ( old ) if err != nil { return nil , fmt . Errorf ( " " , obj , old , err ) } } return NewPodSpecMutator ( spec , oldSpec , path , resolveAnnotationChanged ) , nil } if spec , path , err := GetPodSpecV1 ( obj ) ; err == nil { var oldSpec * kapiv1 . PodSpec if old != nil { oldSpec , _ , err = GetPodSpecV1 ( old ) if err != nil { return nil , fmt . Errorf ( " " , obj , old , err ) } } return NewPodSpecV1Mutator ( spec , oldSpec , path , resolveAnnotationChanged ) , nil } return nil , errNoImageMutator }
GetImageReferenceMutator returns a mutator for the provided object, or an error if no
such mutator is defined.
GetImageReferenceMutator returns a mutator for the provided object or an error if no such mutator is defined .