mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
also remove slow tag from resizing tests
This commit is contained in:
parent
e3faa003a1
commit
7d823e5df0
@ -368,7 +368,7 @@ if [[ -n "${GCE_GLBC_IMAGE:-}" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${KUBE_ADMISSION_CONTROL:-}" ]]; then
|
if [[ -z "${KUBE_ADMISSION_CONTROL:-}" ]]; then
|
||||||
ADMISSION_CONTROL="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,PodPreset,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,StorageObjectInUseProtection"
|
ADMISSION_CONTROL="NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,PodPreset,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,Priority,StorageObjectInUseProtection,PersistentVolumeClaimResize"
|
||||||
if [[ "${ENABLE_POD_SECURITY_POLICY:-}" == "true" ]]; then
|
if [[ "${ENABLE_POD_SECURITY_POLICY:-}" == "true" ]]; then
|
||||||
ADMISSION_CONTROL="${ADMISSION_CONTROL},PodSecurityPolicy"
|
ADMISSION_CONTROL="${ADMISSION_CONTROL},PodSecurityPolicy"
|
||||||
fi
|
fi
|
||||||
|
@ -35,7 +35,7 @@ import (
|
|||||||
"k8s.io/kubernetes/test/e2e/storage/utils"
|
"k8s.io/kubernetes/test/e2e/storage/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = utils.SIGDescribe("Mounted volume expand[Slow]", func() {
|
var _ = utils.SIGDescribe("Mounted volume expand", func() {
|
||||||
var (
|
var (
|
||||||
c clientset.Interface
|
c clientset.Interface
|
||||||
ns string
|
ns string
|
||||||
|
@ -40,7 +40,7 @@ const (
|
|||||||
totalResizeWaitPeriod = 20 * time.Minute
|
totalResizeWaitPeriod = 20 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
|
var _ = utils.SIGDescribe("Volume expand", func() {
|
||||||
var (
|
var (
|
||||||
c clientset.Interface
|
c clientset.Interface
|
||||||
ns string
|
ns string
|
||||||
@ -80,7 +80,6 @@ var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
|
|||||||
test := testsuites.StorageClassTest{
|
test := testsuites.StorageClassTest{
|
||||||
Name: "no-expansion",
|
Name: "no-expansion",
|
||||||
ClaimSize: "2Gi",
|
ClaimSize: "2Gi",
|
||||||
AllowVolumeExpansion: false,
|
|
||||||
}
|
}
|
||||||
regularSC, err := createStorageClass(test, ns, "noexpand", c)
|
regularSC, err := createStorageClass(test, ns, "noexpand", c)
|
||||||
Expect(err).NotTo(HaveOccurred(), "Error creating non-expandable storage class")
|
Expect(err).NotTo(HaveOccurred(), "Error creating non-expandable storage class")
|
||||||
@ -88,9 +87,7 @@ var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
|
|||||||
defer func() {
|
defer func() {
|
||||||
framework.ExpectNoError(c.StorageV1().StorageClasses().Delete(regularSC.Name, nil))
|
framework.ExpectNoError(c.StorageV1().StorageClasses().Delete(regularSC.Name, nil))
|
||||||
}()
|
}()
|
||||||
|
Expect(regularSC.AllowVolumeExpansion).To(BeNil())
|
||||||
Expect(regularSC.AllowVolumeExpansion).NotTo(BeNil())
|
|
||||||
Expect(*resizableSc.AllowVolumeExpansion).To(BeFalse())
|
|
||||||
|
|
||||||
noExpandPVC := newClaim(test, ns, "noexpand")
|
noExpandPVC := newClaim(test, ns, "noexpand")
|
||||||
noExpandPVC.Spec.StorageClassName = ®ularSC.Name
|
noExpandPVC.Spec.StorageClassName = ®ularSC.Name
|
||||||
@ -108,7 +105,7 @@ var _ = utils.SIGDescribe("Volume expand [Slow]", func() {
|
|||||||
|
|
||||||
By("Expanding non-expandable pvc")
|
By("Expanding non-expandable pvc")
|
||||||
newSize := resource.MustParse("6Gi")
|
newSize := resource.MustParse("6Gi")
|
||||||
pvc, err = expandPVCSize(noExpandPVC, newSize, c)
|
noExpandPVC, err = expandPVCSize(noExpandPVC, newSize, c)
|
||||||
Expect(err).To(HaveOccurred(), "While updating non-expandable PVC")
|
Expect(err).To(HaveOccurred(), "While updating non-expandable PVC")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1063,7 +1063,11 @@ func newStorageClass(t testsuites.StorageClassTest, ns string, suffix string) *s
|
|||||||
if t.DelayBinding {
|
if t.DelayBinding {
|
||||||
bindingMode = storage.VolumeBindingWaitForFirstConsumer
|
bindingMode = storage.VolumeBindingWaitForFirstConsumer
|
||||||
}
|
}
|
||||||
return getStorageClass(pluginName, t.Parameters, &bindingMode, ns, suffix)
|
sc := getStorageClass(pluginName, t.Parameters, &bindingMode, ns, suffix)
|
||||||
|
if t.AllowVolumeExpansion {
|
||||||
|
sc.AllowVolumeExpansion = &t.AllowVolumeExpansion
|
||||||
|
}
|
||||||
|
return sc
|
||||||
}
|
}
|
||||||
|
|
||||||
func getStorageClass(
|
func getStorageClass(
|
||||||
|
Loading…
Reference in New Issue
Block a user