func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*DeploymentSpec))(in) } if in.Replicas != nil { out.Replicas = int(*in.Replicas) } if in.Selector != nil { out.Selector = make(map[string]string) for key, val := range in.Selector { out.Selector[key] = val } } else { out.Selector = nil } if err := Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { return err } if in.UniqueLabelKey != nil { out.UniqueLabelKey = *in.UniqueLabelKey } out.Paused = in.Paused return nil }
func Convert_v1beta1_DeploymentSpec_To_extensions_DeploymentSpec(in *DeploymentSpec, out *extensions.DeploymentSpec, s conversion.Scope) error { if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found { defaulting.(func(*DeploymentSpec))(in) } if in.Replicas != nil { out.Replicas = int(*in.Replicas) } if in.Selector != nil { out.Selector = make(map[string]string) for key, val := range in.Selector { out.Selector[key] = val } } else { out.Selector = nil } if err := v1.Convert_v1_PodTemplateSpec_To_api_PodTemplateSpec(&in.Template, &out.Template, s); err != nil { return err } if err := Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy(&in.Strategy, &out.Strategy, s); err != nil { return err } if in.RevisionHistoryLimit != nil { out.RevisionHistoryLimit = new(int) *out.RevisionHistoryLimit = int(*in.RevisionHistoryLimit) } if in.UniqueLabelKey != nil { out.UniqueLabelKey = *in.UniqueLabelKey } out.MinReadySeconds = int(in.MinReadySeconds) out.Paused = in.Paused if in.RollbackTo != nil { out.RollbackTo = new(extensions.RollbackConfig) out.RollbackTo.Revision = in.RollbackTo.Revision } else { out.RollbackTo = nil } return nil }