mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Merge pull request #129583 from carlory/promote-HonorPVReclaimPolicy-GA
promote HonorPVReclaimPolicy to GA
This commit is contained in:
commit
a743616631
@ -22,6 +22,7 @@ import (
|
|||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
storage "k8s.io/api/storage/v1"
|
storage "k8s.io/api/storage/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
featuregatetesting "k8s.io/component-base/featuregate/testing"
|
featuregatetesting "k8s.io/component-base/featuregate/testing"
|
||||||
"k8s.io/component-helpers/storage/volume"
|
"k8s.io/component-helpers/storage/volume"
|
||||||
@ -37,6 +38,8 @@ import (
|
|||||||
func TestDeleteSync(t *testing.T) {
|
func TestDeleteSync(t *testing.T) {
|
||||||
const gceDriver = "pd.csi.storage.gke.io"
|
const gceDriver = "pd.csi.storage.gke.io"
|
||||||
// Default enable the HonorPVReclaimPolicy feature gate.
|
// Default enable the HonorPVReclaimPolicy feature gate.
|
||||||
|
// TODO: this will be removed in 1.36
|
||||||
|
featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32"))
|
||||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
||||||
_, ctx := ktesting.NewTestContext(t)
|
_, ctx := ktesting.NewTestContext(t)
|
||||||
tests := []controllerTest{
|
tests := []controllerTest{
|
||||||
|
@ -29,6 +29,7 @@ import (
|
|||||||
storage "k8s.io/api/storage/v1"
|
storage "k8s.io/api/storage/v1"
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
corelisters "k8s.io/client-go/listers/core/v1"
|
corelisters "k8s.io/client-go/listers/core/v1"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
"k8s.io/component-helpers/storage/volume"
|
"k8s.io/component-helpers/storage/volume"
|
||||||
@ -172,6 +173,8 @@ var provision2Success = provisionCall{
|
|||||||
// 3. Compare resulting volumes with expected volumes.
|
// 3. Compare resulting volumes with expected volumes.
|
||||||
func TestProvisionSync(t *testing.T) {
|
func TestProvisionSync(t *testing.T) {
|
||||||
// Default enable the HonorPVReclaimPolicy feature gate.
|
// Default enable the HonorPVReclaimPolicy feature gate.
|
||||||
|
// TODO: this will be removed in 1.36
|
||||||
|
featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32"))
|
||||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
||||||
_, ctx := ktesting.NewTestContext(t)
|
_, ctx := ktesting.NewTestContext(t)
|
||||||
tests := []controllerTest{
|
tests := []controllerTest{
|
||||||
@ -599,6 +602,8 @@ func TestProvisionSync(t *testing.T) {
|
|||||||
// Some limit of calls in enforced to prevent endless loops.
|
// Some limit of calls in enforced to prevent endless loops.
|
||||||
func TestProvisionMultiSync(t *testing.T) {
|
func TestProvisionMultiSync(t *testing.T) {
|
||||||
// Default enable the HonorPVReclaimPolicy feature gate.
|
// Default enable the HonorPVReclaimPolicy feature gate.
|
||||||
|
// TODO: this will be removed in 1.36
|
||||||
|
featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32"))
|
||||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
||||||
|
|
||||||
_, ctx := ktesting.NewTestContext(t)
|
_, ctx := ktesting.NewTestContext(t)
|
||||||
|
@ -26,6 +26,7 @@ import (
|
|||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
storagev1 "k8s.io/api/storage/v1"
|
storagev1 "k8s.io/api/storage/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
"k8s.io/apimachinery/pkg/util/version"
|
||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
"k8s.io/apimachinery/pkg/watch"
|
"k8s.io/apimachinery/pkg/watch"
|
||||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
@ -52,6 +53,8 @@ import (
|
|||||||
// either very timing-sensitive or slow to wait for real periodic sync.
|
// either very timing-sensitive or slow to wait for real periodic sync.
|
||||||
func TestControllerSync(t *testing.T) {
|
func TestControllerSync(t *testing.T) {
|
||||||
// Default enable the HonorPVReclaimPolicy feature gate.
|
// Default enable the HonorPVReclaimPolicy feature gate.
|
||||||
|
// TODO: this will be removed in 1.36
|
||||||
|
featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32"))
|
||||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
||||||
tests := []controllerTest{
|
tests := []controllerTest{
|
||||||
// [Unit test set 5] - controller tests.
|
// [Unit test set 5] - controller tests.
|
||||||
@ -602,6 +605,8 @@ func TestModifyDeletionFinalizers(t *testing.T) {
|
|||||||
// in-tree plugin is used as migration is disabled. When that plugin is migrated, a different
|
// in-tree plugin is used as migration is disabled. When that plugin is migrated, a different
|
||||||
// non-migrated one should be used. If all plugins are migrated this test can be removed. The
|
// non-migrated one should be used. If all plugins are migrated this test can be removed. The
|
||||||
// gce in-tree plugin is used for a migrated driver as it is feature-locked as of 1.25.
|
// gce in-tree plugin is used for a migrated driver as it is feature-locked as of 1.25.
|
||||||
|
// TODO: this will be removed in 1.36
|
||||||
|
featuregatetesting.SetFeatureGateEmulationVersionDuringTest(t, utilfeature.DefaultFeatureGate, version.MustParse("1.32"))
|
||||||
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.HonorPVReclaimPolicy, true)
|
||||||
const nonmigratedDriver = "rbd.csi.ceph.com"
|
const nonmigratedDriver = "rbd.csi.ceph.com"
|
||||||
const migratedPlugin = "kubernetes.io/gce-pd"
|
const migratedPlugin = "kubernetes.io/gce-pd"
|
||||||
|
@ -380,6 +380,7 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
|
|||||||
HonorPVReclaimPolicy: {
|
HonorPVReclaimPolicy: {
|
||||||
{Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha},
|
{Version: version.MustParse("1.23"), Default: false, PreRelease: featuregate.Alpha},
|
||||||
{Version: version.MustParse("1.31"), Default: true, PreRelease: featuregate.Beta},
|
{Version: version.MustParse("1.31"), Default: true, PreRelease: featuregate.Beta},
|
||||||
|
{Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.36
|
||||||
},
|
},
|
||||||
|
|
||||||
HPAScaleToZero: {
|
HPAScaleToZero: {
|
||||||
|
@ -192,20 +192,6 @@ var (
|
|||||||
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
// TODO: document the feature (owning SIG, when to use this feature for a test)
|
||||||
HPA = framework.WithFeature(framework.ValidFeatures.Add("HPA"))
|
HPA = framework.WithFeature(framework.ValidFeatures.Add("HPA"))
|
||||||
|
|
||||||
// owning-sig: sig-storage
|
|
||||||
// kep: https://kep.k8s.io/2680
|
|
||||||
// test-infra jobs:
|
|
||||||
// - pull-kubernetes-e2e-storage-kind-alpha-features (need manual trigger)
|
|
||||||
// - ci-kubernetes-e2e-storage-kind-alpha-features
|
|
||||||
//
|
|
||||||
// When this label is added to a test, it means that the cluster must be created
|
|
||||||
// with the feature-gate "HonorPVReclaimPolicy=true".
|
|
||||||
//
|
|
||||||
// Once the feature are stable, this label should be removed and these tests will
|
|
||||||
// be run by default on any cluster. The test-infra job also should be updated to
|
|
||||||
// not focus on this feature anymore.
|
|
||||||
HonorPVReclaimPolicy = framework.WithFeature(framework.ValidFeatures.Add("HonorPVReclaimPolicy"))
|
|
||||||
|
|
||||||
// owner: sig-node
|
// owner: sig-node
|
||||||
HostAccess = framework.WithFeature(framework.ValidFeatures.Add("HostAccess"))
|
HostAccess = framework.WithFeature(framework.ValidFeatures.Add("HostAccess"))
|
||||||
|
|
||||||
|
@ -106,7 +106,6 @@ type testParameters struct {
|
|||||||
fsGroupPolicy *storagev1.FSGroupPolicy
|
fsGroupPolicy *storagev1.FSGroupPolicy
|
||||||
enableSELinuxMount *bool
|
enableSELinuxMount *bool
|
||||||
enableRecoverExpansionFailure bool
|
enableRecoverExpansionFailure bool
|
||||||
enableHonorPVReclaimPolicy bool
|
|
||||||
enableCSINodeExpandSecret bool
|
enableCSINodeExpandSecret bool
|
||||||
reclaimPolicy *v1.PersistentVolumeReclaimPolicy
|
reclaimPolicy *v1.PersistentVolumeReclaimPolicy
|
||||||
}
|
}
|
||||||
@ -181,7 +180,6 @@ func (m *mockDriverSetup) init(ctx context.Context, tp testParameters) {
|
|||||||
FSGroupPolicy: tp.fsGroupPolicy,
|
FSGroupPolicy: tp.fsGroupPolicy,
|
||||||
EnableSELinuxMount: tp.enableSELinuxMount,
|
EnableSELinuxMount: tp.enableSELinuxMount,
|
||||||
EnableRecoverExpansionFailure: tp.enableRecoverExpansionFailure,
|
EnableRecoverExpansionFailure: tp.enableRecoverExpansionFailure,
|
||||||
EnableHonorPVReclaimPolicy: tp.enableHonorPVReclaimPolicy,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// At the moment, only tests which need hooks are
|
// At the moment, only tests which need hooks are
|
||||||
|
@ -28,8 +28,6 @@ import (
|
|||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/client-go/util/retry"
|
"k8s.io/client-go/util/retry"
|
||||||
storagehelpers "k8s.io/component-helpers/storage/volume"
|
storagehelpers "k8s.io/component-helpers/storage/volume"
|
||||||
"k8s.io/kubernetes/pkg/features"
|
|
||||||
"k8s.io/kubernetes/test/e2e/feature"
|
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2epv "k8s.io/kubernetes/test/e2e/framework/pv"
|
e2epv "k8s.io/kubernetes/test/e2e/framework/pv"
|
||||||
"k8s.io/kubernetes/test/e2e/storage/utils"
|
"k8s.io/kubernetes/test/e2e/storage/utils"
|
||||||
@ -37,7 +35,7 @@ import (
|
|||||||
"k8s.io/utils/ptr"
|
"k8s.io/utils/ptr"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVReclaimPolicy, framework.WithFeatureGate(features.HonorPVReclaimPolicy), func() {
|
var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", func() {
|
||||||
f := framework.NewDefaultFramework("csi-mock-honor-pv-reclaim-policy")
|
f := framework.NewDefaultFramework("csi-mock-honor-pv-reclaim-policy")
|
||||||
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
f.NamespacePodSecurityLevel = admissionapi.LevelPrivileged
|
||||||
m := newMockDriverSetup(f)
|
m := newMockDriverSetup(f)
|
||||||
@ -46,7 +44,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Dynamic provisioning should honor pv delete reclaim policy when deleting pvc", func(ctx context.Context) {
|
ginkgo.It("Dynamic provisioning should honor pv delete reclaim policy when deleting pvc", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -81,7 +78,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Dynamic provisioning should honor pv delete reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
ginkgo.It("Dynamic provisioning should honor pv delete reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -120,7 +116,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Dynamic provisioning should honor pv retain reclaim policy when deleting pvc then pv", func(ctx context.Context) {
|
ginkgo.It("Dynamic provisioning should honor pv retain reclaim policy when deleting pvc then pv", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -167,7 +162,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Dynamic provisioning should honor pv retain reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
ginkgo.It("Dynamic provisioning should honor pv retain reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -208,7 +202,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Static provisioning should honor pv delete reclaim policy when deleting pvc", func(ctx context.Context) {
|
ginkgo.It("Static provisioning should honor pv delete reclaim policy when deleting pvc", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -238,7 +231,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Static provisioning should honor pv delete reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
ginkgo.It("Static provisioning should honor pv delete reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -272,7 +264,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Static provisioning should honor pv retain reclaim policy when deleting pvc then pv", func(ctx context.Context) {
|
ginkgo.It("Static provisioning should honor pv retain reclaim policy when deleting pvc then pv", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -312,7 +303,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("Static provisioning should honor pv retain reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
ginkgo.It("Static provisioning should honor pv retain reclaim policy when deleting pv then pvc", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -348,7 +338,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("should honor pv reclaim policy after it is changed from retain to deleted", func(ctx context.Context) {
|
ginkgo.It("should honor pv reclaim policy after it is changed from retain to deleted", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimRetain),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
@ -406,7 +395,6 @@ var _ = utils.SIGDescribe("CSI Mock honor pv reclaim policy", feature.HonorPVRec
|
|||||||
ginkgo.It("should honor pv reclaim policy after it is changed from deleted to retain", func(ctx context.Context) {
|
ginkgo.It("should honor pv reclaim policy after it is changed from deleted to retain", func(ctx context.Context) {
|
||||||
m.init(ctx, testParameters{
|
m.init(ctx, testParameters{
|
||||||
registerDriver: true,
|
registerDriver: true,
|
||||||
enableHonorPVReclaimPolicy: true,
|
|
||||||
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
reclaimPolicy: ptr.To(v1.PersistentVolumeReclaimDelete),
|
||||||
})
|
})
|
||||||
ginkgo.DeferCleanup(m.cleanup)
|
ginkgo.DeferCleanup(m.cleanup)
|
||||||
|
@ -62,7 +62,6 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
clientset "k8s.io/client-go/kubernetes"
|
clientset "k8s.io/client-go/kubernetes"
|
||||||
"k8s.io/klog/v2"
|
"k8s.io/klog/v2"
|
||||||
"k8s.io/kubernetes/pkg/features"
|
|
||||||
"k8s.io/kubernetes/test/e2e/feature"
|
"k8s.io/kubernetes/test/e2e/feature"
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
@ -356,7 +355,6 @@ type mockCSIDriver struct {
|
|||||||
enableSELinuxMount *bool
|
enableSELinuxMount *bool
|
||||||
enableRecoverExpansionFailure bool
|
enableRecoverExpansionFailure bool
|
||||||
disableControllerExpansion bool
|
disableControllerExpansion bool
|
||||||
enableHonorPVReclaimPolicy bool
|
|
||||||
|
|
||||||
// Additional values set during PrepareTest
|
// Additional values set during PrepareTest
|
||||||
clientSet clientset.Interface
|
clientSet clientset.Interface
|
||||||
@ -407,7 +405,6 @@ type CSIMockDriverOpts struct {
|
|||||||
FSGroupPolicy *storagev1.FSGroupPolicy
|
FSGroupPolicy *storagev1.FSGroupPolicy
|
||||||
EnableSELinuxMount *bool
|
EnableSELinuxMount *bool
|
||||||
EnableRecoverExpansionFailure bool
|
EnableRecoverExpansionFailure bool
|
||||||
EnableHonorPVReclaimPolicy bool
|
|
||||||
|
|
||||||
// Embedded defines whether the CSI mock driver runs
|
// Embedded defines whether the CSI mock driver runs
|
||||||
// inside the cluster (false, the default) or just a proxy
|
// inside the cluster (false, the default) or just a proxy
|
||||||
@ -564,7 +561,6 @@ func InitMockCSIDriver(driverOpts CSIMockDriverOpts) MockCSITestDriver {
|
|||||||
enableVolumeMountGroup: driverOpts.EnableVolumeMountGroup,
|
enableVolumeMountGroup: driverOpts.EnableVolumeMountGroup,
|
||||||
enableSELinuxMount: driverOpts.EnableSELinuxMount,
|
enableSELinuxMount: driverOpts.EnableSELinuxMount,
|
||||||
enableRecoverExpansionFailure: driverOpts.EnableRecoverExpansionFailure,
|
enableRecoverExpansionFailure: driverOpts.EnableRecoverExpansionFailure,
|
||||||
enableHonorPVReclaimPolicy: driverOpts.EnableHonorPVReclaimPolicy,
|
|
||||||
embedded: driverOpts.Embedded,
|
embedded: driverOpts.Embedded,
|
||||||
hooks: driverOpts.Hooks,
|
hooks: driverOpts.Hooks,
|
||||||
}
|
}
|
||||||
@ -726,9 +722,6 @@ func (m *mockCSIDriver) PrepareTest(ctx context.Context, f *framework.Framework)
|
|||||||
if m.enableRecoverExpansionFailure {
|
if m.enableRecoverExpansionFailure {
|
||||||
o.Features["csi-resizer"] = []string{"RecoverVolumeExpansionFailure=true"}
|
o.Features["csi-resizer"] = []string{"RecoverVolumeExpansionFailure=true"}
|
||||||
}
|
}
|
||||||
if m.enableHonorPVReclaimPolicy {
|
|
||||||
o.Features["csi-provisioner"] = append(o.Features["csi-provisioner"], fmt.Sprintf("%s=true", features.HonorPVReclaimPolicy))
|
|
||||||
}
|
|
||||||
|
|
||||||
err = utils.CreateFromManifests(ctx, f, m.driverNamespace, func(item interface{}) error {
|
err = utils.CreateFromManifests(ctx, f, m.driverNamespace, func(item interface{}) error {
|
||||||
if err := utils.PatchCSIDeployment(config.Framework, o, item); err != nil {
|
if err := utils.PatchCSIDeployment(config.Framework, o, item); err != nil {
|
||||||
|
@ -500,6 +500,10 @@
|
|||||||
lockToDefault: false
|
lockToDefault: false
|
||||||
preRelease: Beta
|
preRelease: Beta
|
||||||
version: "1.31"
|
version: "1.31"
|
||||||
|
- default: true
|
||||||
|
lockToDefault: true
|
||||||
|
preRelease: GA
|
||||||
|
version: "1.33"
|
||||||
- name: HPAScaleToZero
|
- name: HPAScaleToZero
|
||||||
versionedSpecs:
|
versionedSpecs:
|
||||||
- default: false
|
- default: false
|
||||||
|
Loading…
Reference in New Issue
Block a user