Skip to content

Commit e89f6df

Browse files
spuiukphlogistonjohn
authored andcommitted
api: Add validation for Spec.Storage.PVC.path
To ensure that it is a first level directory of the form '/directory'. Signed-off-by: Sachin Prabhu <[email protected]>
1 parent f190022 commit e89f6df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

api/v1alpha1/smbshare_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ type SmbSharePvcSpec struct {
8888
Spec *corev1.PersistentVolumeClaimSpec `json:"spec,omitempty"`
8989

9090
// Path within the PVC which should be exported.
91+
// +kubebuilder:validation:Pattern=`^[^\/]+$`
9192
// +optional
9293
Path string `json:"path,omitempty"`
9394
}

0 commit comments

Comments
 (0)