func GetDeploymentLastAppliedPodTemplate(dep *appsv1.Deployment) (*corev1.PodSpec, error) {
	applied, ok := dep.Annotations[LastAppliedPodTemplate]
	if !ok {
		return nil, fmt.Errorf("deployment:[%s/%s] not found spec's apply config", dep.GetNamespace(), dep.GetName())
	}
	podSpec := &corev1.PodSpec{}
	err := json.Unmarshal([]byte(applied), podSpec)
	if err != nil {
		return nil, err
	}
	return podSpec, nil
}
// GetDeploymentLastAppliedPodTemplate set last applied pod template from Deployment's annotation
GetDeploymentLastAppliedPodTemplate set last applied pod template from Deployment's annotation
// GetDeploymentLastAppliedPodTemplate set last applied pod template from Deployment ' s annotation
func GetDeploymentLastAppliedPodTemplate(dep *appsv1.Deployment) (*corev1.PodSpec, error) {
	applied, ok := dep.Annotations[LastAppliedPodTemplate]
	if !ok {
		return nil, fmt.Errorf("deployment:[%s/%s] not found spec's apply config", dep.GetNamespace(), dep.GetName())
	}
	podSpec := &corev1.PodSpec{}
	err := json.Unmarshal([]byte(applied), podSpec)
	if err != nil {
		return nil, err
	}
	return podSpec, nil
}
func GetDeploymentLastAppliedPodTemplate ( dep * appsv1 . Deployment ) ( * corev1 . PodSpec , error ) { applied , ok := dep . Annotations [ LastAppliedPodTemplate ] if ! ok { return nil , fmt . Errorf ( " " , dep . GetNamespace ( ) , dep . GetName ( ) ) } podSpec := & corev1 . PodSpec { } err := json . Unmarshal ( [ ] byte ( applied ) , podSpec ) if err != nil { return nil , err } return podSpec , nil }
GetDeploymentLastAppliedPodTemplate set last applied pod template from Deployment's annotation
GetDeploymentLastAppliedPodTemplate set last applied pod template from Deployment ' s annotation