Skip to content

Commit

Permalink
fix: changed the csistoragecapacity check namespace
Browse files Browse the repository at this point in the history
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 <nibalach@redhat.com>
  • Loading branch information
nbalacha committed Jun 27, 2022
1 parent 7f08eff commit 20a4836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/csi-provisioner/csi-provisioner.go
Expand Up @@ -493,7 +493,7 @@ func main() {
Name: "#%123-invalid-name",
},
}
createdCapacity, err := clientset.StorageV1().CSIStorageCapacities("default").Create(ctx, invalidCapacity, metav1.CreateOptions{})
createdCapacity, err := clientset.StorageV1().CSIStorageCapacities(namespace).Create(ctx, invalidCapacity, metav1.CreateOptions{})
switch {
case err == nil:
klog.Fatalf("creating an invalid v1.CSIStorageCapacity didn't fail as expected, got: %s", createdCapacity)
Expand Down

0 comments on commit 20a4836

Please sign in to comment.