Move feature gate to GA

This commit is contained in:
Michelle Au 2019-10-03 11:31:57 -07:00
parent 9268d40539
commit 8f6ab81cd4
2 changed files with 2 additions and 105 deletions

View File

@ -198,6 +198,7 @@ const (
// owner: @verult
// alpha: v1.12
// beta: v1.14
// ga: v1.17
// Enable all logic related to the CSINode API object in storage.k8s.io
CSINodeInfo featuregate.Feature = "CSINodeInfo"
@ -534,7 +535,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
NodeDisruptionExclusion: {Default: false, PreRelease: featuregate.Alpha},
MountContainers: {Default: false, PreRelease: featuregate.Alpha},
CSIDriverRegistry: {Default: true, PreRelease: featuregate.Beta},
CSINodeInfo: {Default: true, PreRelease: featuregate.Beta},
CSINodeInfo: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.19
BlockVolume: {Default: true, PreRelease: featuregate.Beta},
StorageObjectInUseProtection: {Default: true, PreRelease: featuregate.GA},
ResourceLimitsPriorityFunction: {Default: false, PreRelease: featuregate.Alpha},

View File

@ -611,62 +611,6 @@ func generateVolumeLimits(i int32) *storage.VolumeNodeResources {
}
}
// TestInstallCSIDriver_CSINodeInfoDisabled tests InstallCSIDriver with various existing Node annotations
// and CSINodeInfo feature gate disabled.
func TestInstallCSIDriverCSINodeInfoDisabled(t *testing.T) {
testcases := []testcase{
{
name: "empty node",
driverName: "com.example.csi.driver1",
existingNode: generateNode(nil /* nodeIDs */, nil /* labels */, nil /*capacity*/),
inputNodeID: "com.example.csi/csi-node1",
expectedNode: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node1",
Annotations: map[string]string{annotationKeyNodeID: marshall(nodeIDMap{"com.example.csi.driver1": "com.example.csi/csi-node1"})},
},
},
},
{
name: "pre-existing node info from the same driver",
driverName: "com.example.csi.driver1",
existingNode: generateNode(
nodeIDMap{
"com.example.csi.driver1": "com.example.csi/csi-node1",
},
nil /* labels */, nil /*capacity*/),
inputNodeID: "com.example.csi/csi-node1",
expectedNode: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node1",
Annotations: map[string]string{annotationKeyNodeID: marshall(nodeIDMap{"com.example.csi.driver1": "com.example.csi/csi-node1"})},
},
},
},
{
name: "pre-existing node info from different driver",
driverName: "com.example.csi.driver1",
existingNode: generateNode(
nodeIDMap{
"net.example.storage.other-driver": "net.example.storage/test-node",
},
nil /* labels */, nil /*capacity*/),
inputNodeID: "com.example.csi/csi-node1",
expectedNode: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node1",
Annotations: map[string]string{annotationKeyNodeID: marshall(nodeIDMap{
"com.example.csi.driver1": "com.example.csi/csi-node1",
"net.example.storage.other-driver": "net.example.storage/test-node",
})},
},
},
},
}
test(t, true /* addNodeInfo */, false /* csiNodeInfoEnabled */, testcases)
}
// TestUninstallCSIDriver tests UninstallCSIDriver with various existing Node and/or CSINode objects.
func TestUninstallCSIDriver(t *testing.T) {
testcases := []testcase{
@ -829,54 +773,6 @@ func TestUninstallCSIDriver(t *testing.T) {
test(t, false /* addNodeInfo */, true /* csiNodeInfoEnabled */, testcases)
}
// TestUninstallCSIDriver tests UninstallCSIDriver with various existing Node objects and CSINode
// feature disabled.
func TestUninstallCSIDriverCSINodeInfoDisabled(t *testing.T) {
testcases := []testcase{
{
name: "empty node",
driverName: "com.example.csi/driver1",
existingNode: generateNode(nil /* nodeIDs */, nil /* labels */, nil /*capacity*/),
expectedNode: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node1",
},
},
},
{
name: "pre-existing node info from the same driver",
driverName: "com.example.csi/driver1",
existingNode: generateNode(
nodeIDMap{
"com.example.csi/driver1": "com.example.csi/csi-node1",
},
nil /* labels */, nil /*capacity*/),
expectedNode: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node1",
},
},
},
{
name: "pre-existing node info from different driver",
driverName: "com.example.csi/driver1",
existingNode: generateNode(
nodeIDMap{
"net.example.storage/other-driver": "net.example.storage/csi-node1",
},
nil /* labels */, nil /*capacity*/),
expectedNode: &v1.Node{
ObjectMeta: metav1.ObjectMeta{
Name: "node1",
Annotations: map[string]string{annotationKeyNodeID: marshall(nodeIDMap{"net.example.storage/other-driver": "net.example.storage/csi-node1"})},
},
},
},
}
test(t, false /* addNodeInfo */, false /* csiNodeInfoEnabled */, testcases)
}
func TestSetMigrationAnnotation(t *testing.T) {
testcases := []struct {
name string