func GetPodSpec(obj runtime.Object) (*core.PodSpec, *field.Path, error) {
	switch r := obj.(type) {
	case *core.Pod:
		return &r.Spec, field.NewPath("spec"), nil
	case *core.PodTemplate:
		return &r.Template.Spec, field.NewPath("template", "spec"), nil
	case *core.ReplicationController:
		if r.Spec.Template != nil {
			return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
		}
	case *apps.DaemonSet:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *apps.Deployment:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *apps.ReplicaSet:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *batch.Job:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *batch.CronJob:
		return &r.Spec.JobTemplate.Spec.Template.Spec, field.NewPath("spec", "jobTemplate", "spec", "template", "spec"), nil
	case *batch.JobTemplate:
		return &r.Template.Spec.Template.Spec, field.NewPath("template", "spec", "template", "spec"), nil
	case *apps.StatefulSet:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	}
	return nil, nil, errNoPodSpec
}
// GetPodSpec returns a mutable pod spec out of the provided object, including a field path
// to the field in the object, or an error if the object does not contain a pod spec.
// This only returns internal objects.
GetPodSpec returns a mutable pod spec out of the provided object, including a field path
to the field in the object, or an error if the object does not contain a pod spec.
This only returns internal objects.
// GetPodSpec returns a mutable pod spec out of the provided object including a field path // to the field in the object or an error if the object does not contain a pod spec . // This only returns internal objects .
func GetPodSpec(obj runtime.Object) (*core.PodSpec, *field.Path, error) {
	switch r := obj.(type) {
	case *core.Pod:
		return &r.Spec, field.NewPath("spec"), nil
	case *core.PodTemplate:
		return &r.Template.Spec, field.NewPath("template", "spec"), nil
	case *core.ReplicationController:
		if r.Spec.Template != nil {
			return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
		}
	case *apps.DaemonSet:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *apps.Deployment:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *apps.ReplicaSet:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *batch.Job:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	case *batch.CronJob:
		return &r.Spec.JobTemplate.Spec.Template.Spec, field.NewPath("spec", "jobTemplate", "spec", "template", "spec"), nil
	case *batch.JobTemplate:
		return &r.Template.Spec.Template.Spec, field.NewPath("template", "spec", "template", "spec"), nil
	case *apps.StatefulSet:
		return &r.Spec.Template.Spec, field.NewPath("spec", "template", "spec"), nil
	}
	return nil, nil, errNoPodSpec
}
func GetPodSpec ( obj runtime . Object ) ( * core . PodSpec , * field . Path , error ) { switch r := obj . ( type ) { case * core . Pod : return & r . Spec , field . NewPath ( " " ) , nil case * core . PodTemplate : return & r . Template . Spec , field . NewPath ( " " , " " ) , nil case * core . ReplicationController : if r . Spec . Template != nil { return & r . Spec . Template . Spec , field . NewPath ( " " , " " , " " ) , nil } case * apps . DaemonSet : return & r . Spec . Template . Spec , field . NewPath ( " " , " " , " " ) , nil case * apps . Deployment : return & r . Spec . Template . Spec , field . NewPath ( " " , " " , " " ) , nil case * apps . ReplicaSet : return & r . Spec . Template . Spec , field . NewPath ( " " , " " , " " ) , nil case * batch . Job : return & r . Spec . Template . Spec , field . NewPath ( " " , " " , " " ) , nil case * batch . CronJob : return & r . Spec . JobTemplate . Spec . Template . Spec , field . NewPath ( " " , " " , " " , " " , " " ) , nil case * batch . JobTemplate : return & r . Template . Spec . Template . Spec , field . NewPath ( " " , " " , " " , " " ) , nil case * apps . StatefulSet : return & r . Spec . Template . Spec , field . NewPath ( " " , " " , " " ) , nil } return nil , nil , errNoPodSpec }
GetPodSpec returns a mutable pod spec out of the provided object, including a field path
to the field in the object, or an error if the object does not contain a pod spec.
GetPodSpec returns a mutable pod spec out of the provided object including a field path to the field in the object or an error if the object does not contain a pod spec .