Skip to content

Commit

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

[release-1.6] 🐛 Fix indexing in ClusterClass webhook MHC validation
  • Loading branch information
k8s-ci-robot committed May 24, 2024
2 parents 8e15b9e + d935ed8 commit 9934f4f
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 9934f4f

Please sign in to comment.