code: func ValidateIngress(ingress *networking.Ingress) field.ErrorList {
  	allErrs := apivalidation.ValidateObjectMeta(&ingress.ObjectMeta, true, ValidateIngressName, field.NewPath("metadata"))
  	allErrs = append(allErrs, ValidateIngressSpec(&ingress.Spec, field.NewPath("spec"))...)
  	return allErrs
  }
docs: // ValidateIngress tests if required fields in the Ingress are set.