Skip to content

Commit

Permalink
added Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
amarflybot authored and amarenku committed Dec 10, 2024
1 parent 7fc8884 commit 5cd7605
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/serving/k8s_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ func validateEmptyDirFields(dir *corev1.EmptyDirVolumeSource) *apis.FieldError {

func validateHostPathVolumeSource(hostPath *corev1.HostPathVolumeSource) *apis.FieldError {
var errs *apis.FieldError
// This is checked at the K8s side for host Path so better validate early
// ref: https://bit.ly/4gcWAVK
if len(hostPath.Path) == 0 {
errs = errs.Also(apis.ErrInvalidValue("''", "path"))
return errs
Expand Down

0 comments on commit 5cd7605

Please sign in to comment.