code: func SetFromReplicaSetTemplate(deployment *extensions.Deployment, template api.PodTemplateSpec) *extensions.Deployment {
  	deployment.Spec.Template.ObjectMeta = template.ObjectMeta
  	deployment.Spec.Template.Spec = template.Spec
  	deployment.Spec.Template.ObjectMeta.Labels = labelsutil.CloneAndRemoveLabel(
  		deployment.Spec.Template.ObjectMeta.Labels,
  		extensions.DefaultDeploymentUniqueLabelKey)
  	return deployment
  }
docs: // SetFromReplicaSetTemplate sets the desired PodTemplateSpec from a replica set template to the given deployment.