Details
-
Bug
-
Resolution: Won't Do
-
Undefined
-
None
-
4.15
-
None
-
Low
-
No
-
False
-
Description
Description of problem:
When creating storageclass with reclaimPolicy: "", the creation get succeed and there is null reclaimPolicy in srorageclass:
$ cat<<EOF| oc create -f - > allowVolumeExpansion: true > apiVersion: storage.k8s.io/v1 > kind: StorageClass > metadata: > name: thin-csi-copy > parameters: > StoragePolicyName: openshift-storage-policy-wduan-vsphere-x2v4c > provisioner: csi.vsphere.vmware.com > reclaimPolicy: "" > EOF storageclass.storage.k8s.io/thin-csi-copy created
$ oc get sc thin-csi-copy NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE thin-csi-copy csi.vsphere.vmware.com Immediate true 19s $ oc get sc thin-csi-copy -o json | jq .reclaimPolicy ""
Version-Release number of selected component (if applicable):
4.15 nightly, it should be the same as previous releases
How reproducible:
Always
Steps to Reproduce:
See description
Actual results:
The storageclass creation get succeed and there is null reclaimPolicy in srorageclass
Expected results:
The storageclass creation should be rejected.
Additional info:
1. Similar for sc.volumeBindingMode, it is rejected when set volumeBindingMode: "" $ cat<<EOF| oc create -f - > allowVolumeExpansion: true > apiVersion: storage.k8s.io/v1 > kind: StorageClass > metadata: > name: thin-csi-copy > parameters: > StoragePolicyName: openshift-storage-policy-wduan-vsphere-x2v4c > provisioner: csi.vsphere.vmware.com > volumeBindingMode: "" > EOF The StorageClass "thin-csi-copy" is invalid: volumeBindingMode: Unsupported value: "": supported values: "Immediate", "WaitForFirstConsumer"