code: func (deploymentStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
  	deployment := obj.(*apps.Deployment)
  	allErrs := validation.ValidateDeployment(deployment)
  	allErrs = append(allErrs, corevalidation.ValidateConditionalPodTemplate(&deployment.Spec.Template, nil, field.NewPath("spec.template"))...)
  	return allErrs
  }
docs: // Validate validates a new deployment.