Skip to content

Commit

Permalink
test: actually test "Dynamic PV (default fs)" with default FS type
Browse files Browse the repository at this point in the history
There are cases where it really matters whether the storage class
contains a FS
type (kubernetes-csi/external-provisioner#328 (comment)). To
cover that with our tests we need a storage class that has just the
defaults.

Explicitly setting reclaim policy and immediate binding also only
makes sense to show that those options exists, which is covered by
Kubernetes documentation. We better ensure that we really use the
defaults by not even setting those.
  • Loading branch information
pohly committed Nov 6, 2020
1 parent 9dab280 commit 0b1b48f
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 10 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ KUSTOMIZE += $(foreach version,$(KUSTOMIZE_KUBERNETES_VERSIONS),$(subst X.XX,$(v
# use different base.
KUSTOMIZE += $(subst kubernetes-base,kubernetes-1.19-alpha,$(subst X.XX,1.19-alpha,$(KUSTOMIZE_KUBERNETES_OUTPUT)))

KUSTOMIZE += deploy/common/pmem-storageclass-default.yaml=deploy/kustomize/storageclass
KUSTOMIZE += deploy/common/pmem-storageclass-ext4.yaml=deploy/kustomize/storageclass-ext4
KUSTOMIZE += deploy/common/pmem-storageclass-xfs.yaml=deploy/kustomize/storageclass-xfs
KUSTOMIZE += deploy/common/pmem-storageclass-cache.yaml=deploy/kustomize/storageclass-cache
Expand Down
2 changes: 0 additions & 2 deletions deploy/common/pmem-storageclass-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ parameters:
cacheSize: "2"
persistencyModel: cache
provisioner: pmem-csi.intel.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
2 changes: 0 additions & 2 deletions deploy/common/pmem-storageclass-ext4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ parameters:
csi.storage.k8s.io/fstype: ext4
eraseafter: "true"
provisioner: pmem-csi.intel.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
1 change: 0 additions & 1 deletion deploy/common/pmem-storageclass-late-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ kind: StorageClass
metadata:
name: pmem-csi-sc-late-binding
provisioner: pmem-csi.intel.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
2 changes: 0 additions & 2 deletions deploy/common/pmem-storageclass-xfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ parameters:
csi.storage.k8s.io/fstype: xfs
eraseafter: "false"
provisioner: pmem-csi.intel.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
2 changes: 0 additions & 2 deletions deploy/kustomize/storageclass/pmem-storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ kind: StorageClass
metadata:
name: pmem-csi-sc
provisioner: pmem-csi.intel.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
2 changes: 1 addition & 1 deletion test/e2e/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func New(name, csiDriverName string, fsTypes []string, scManifests map[string]st
}
if scManifests == nil {
scManifests = map[string]string{
"": "deploy/common/pmem-storageclass-ext4.yaml",
"": "deploy/common/pmem-storageclass-default.yaml",
"ext4": "deploy/common/pmem-storageclass-ext4.yaml",
"xfs": "deploy/common/pmem-storageclass-xfs.yaml",
}
Expand Down

0 comments on commit 0b1b48f

Please sign in to comment.