Skip to content

Commit f901220

Browse files
nbalachapohly
authored andcommitted
fix: changed the csistoragecapacity check namespace
The CSIStorageCapacity v1 check was attampting to create an invalid object in the default namespace. This would fail if the pod did not have permissions to the namespace. This will now use the namespace specified in the NAMESPACE env variable. Signed-off-by: N Balachandran <[email protected]>
1 parent 7f08eff commit f901220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/csi-provisioner/csi-provisioner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ func main() {
493493
Name: "#%123-invalid-name",
494494
},
495495
}
496-
createdCapacity, err := clientset.StorageV1().CSIStorageCapacities("default").Create(ctx, invalidCapacity, metav1.CreateOptions{})
496+
createdCapacity, err := clientset.StorageV1().CSIStorageCapacities(namespace).Create(ctx, invalidCapacity, metav1.CreateOptions{})
497497
switch {
498498
case err == nil:
499499
klog.Fatalf("creating an invalid v1.CSIStorageCapacity didn't fail as expected, got: %s", createdCapacity)

0 commit comments

Comments
 (0)