func DropDisabledPodFields(pod, oldPod *api.Pod) {
	var (
		podSpec           *api.PodSpec
		podAnnotations    map[string]string
		oldPodSpec        *api.PodSpec
		oldPodAnnotations map[string]string
		podStatus         *api.PodStatus
		oldPodStatus      *api.PodStatus
	)
	if pod != nil {
		podSpec = &pod.Spec
		podAnnotations = pod.Annotations
		podStatus = &pod.Status
	}
	if oldPod != nil {
		oldPodSpec = &oldPod.Spec
		oldPodAnnotations = oldPod.Annotations
		oldPodStatus = &oldPod.Status
	}
	dropDisabledFields(podSpec, podAnnotations, oldPodSpec, oldPodAnnotations)
	dropPodStatusDisabledFields(podStatus, oldPodStatus)
}
// DropDisabledPodFields removes disabled fields from the pod metadata and spec.
// This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a Pod
DropDisabledPodFields removes disabled fields from the pod metadata and spec.
This should be called from PrepareForCreate/PrepareForUpdate for all resources containing a Pod
// DropDisabledPodFields removes disabled fields from the pod metadata and spec . // This should be called from PrepareForCreate / PrepareForUpdate for all resources containing a Pod
func DropDisabledPodFields(pod, oldPod *api.Pod) {
	var (
		podSpec           *api.PodSpec
		podAnnotations    map[string]string
		oldPodSpec        *api.PodSpec
		oldPodAnnotations map[string]string
		podStatus         *api.PodStatus
		oldPodStatus      *api.PodStatus
	)
	if pod != nil {
		podSpec = &pod.Spec
		podAnnotations = pod.Annotations
		podStatus = &pod.Status
	}
	if oldPod != nil {
		oldPodSpec = &oldPod.Spec
		oldPodAnnotations = oldPod.Annotations
		oldPodStatus = &oldPod.Status
	}
	dropDisabledFields(podSpec, podAnnotations, oldPodSpec, oldPodAnnotations)
	dropPodStatusDisabledFields(podStatus, oldPodStatus)
}
func DropDisabledPodFields ( pod , oldPod * api . Pod ) { var ( podSpec * api . PodSpec podAnnotations map [ string ] string oldPodSpec * api . PodSpec oldPodAnnotations map [ string ] string podStatus * api . PodStatus oldPodStatus * api . PodStatus ) if pod != nil { podSpec = & pod . Spec podAnnotations = pod . Annotations podStatus = & pod . Status } if oldPod != nil { oldPodSpec = & oldPod . Spec oldPodAnnotations = oldPod . Annotations oldPodStatus = & oldPod . Status } dropDisabledFields ( podSpec , podAnnotations , oldPodSpec , oldPodAnnotations ) dropPodStatusDisabledFields ( podStatus , oldPodStatus ) }
DropDisabledPodFields removes disabled fields from the pod metadata and spec.
DropDisabledPodFields removes disabled fields from the pod metadata and spec .