code: func ScaleFromDeployment(deployment *Deployment) *Scale {
  	return &Scale{
  		ObjectMeta: api.ObjectMeta{
  			Name:              deployment.Name,
  			Namespace:         deployment.Namespace,
  			CreationTimestamp: deployment.CreationTimestamp,
  		},
  		Spec: ScaleSpec{
  			Replicas: deployment.Spec.Replicas,
  		},
  		Status: ScaleStatus{
  			Replicas: deployment.Status.Replicas,
  			Selector: deployment.Spec.Selector,
  		},
  	}
  }
docs: // ScaleFromDeployment returns a scale subresource for a deployment.