Skip to content

Commit

Permalink
Merge pull request #10678 from k8s-infra-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-10672-to-release-1.7

[release-1.7] 🐛 Fix indexing in ClusterClass webhook MHC validation
  • Loading branch information
k8s-ci-robot authored May 24, 2024
2 parents 59cd48f + 1bd9420 commit 68bf7ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/webhooks/clusterclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func validateMachineHealthCheckClasses(clusterClass *clusterv1.ClusterClass) fie
if md.MachineHealthCheck == nil {
continue
}
fldPath := field.NewPath("spec", "workers", "machineDeployments", "machineHealthCheck").Index(i)
fldPath := field.NewPath("spec", "workers", "machineDeployments").Index(i).Child("machineHealthCheck")

allErrs = append(allErrs, validateMachineHealthCheckClass(fldPath, clusterClass.Namespace, md.MachineHealthCheck)...)
}
Expand Down

0 comments on commit 68bf7ab

Please sign in to comment.