Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
WorkloadTemplate field path should be workloadTemplate (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
huiwq1990 authored May 10, 2022
1 parent d880b03 commit 917fb6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func validateUnitedDeploymentSpec(c client.Client, spec *unitv1alpha1.UnitedDepl
if err != nil {
allErrs = append(allErrs, field.Invalid(fldPath.Child("selector"), spec.Selector, ""))
} else {
allErrs = append(allErrs, validatePoolTemplate(&(spec.WorkloadTemplate), spec, selector, fldPath.Child("template"))...)
allErrs = append(allErrs, validatePoolTemplate(&(spec.WorkloadTemplate), spec, selector, fldPath.Child("workloadTemplate"))...)
}

poolNames := sets.String{}
Expand Down Expand Up @@ -135,7 +135,7 @@ func convertPodTemplateSpec(template *v1.PodTemplateSpec) (*core.PodTemplateSpec

func validateUnitedDeploymentSpecUpdate(spec, oldSpec *unitv1alpha1.UnitedDeploymentSpec, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, validateWorkloadTemplateUpdate(&spec.WorkloadTemplate, &oldSpec.WorkloadTemplate, fldPath.Child("template"))...)
allErrs = append(allErrs, validateWorkloadTemplateUpdate(&spec.WorkloadTemplate, &oldSpec.WorkloadTemplate, fldPath.Child("workloadTemplate"))...)
allErrs = append(allErrs, validateUnitedDeploymentTopology(&spec.Topology, &oldSpec.Topology, fldPath.Child("topology"))...)
return allErrs
}
Expand Down

0 comments on commit 917fb6c

Please sign in to comment.