mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Move feature gate to GA
This commit is contained in:
parent
9268d40539
commit
8f6ab81cd4
@ -198,6 +198,7 @@ const (
|
|||||||
// owner: @verult
|
// owner: @verult
|
||||||
// alpha: v1.12
|
// alpha: v1.12
|
||||||
// beta: v1.14
|
// beta: v1.14
|
||||||
|
// ga: v1.17
|
||||||
// Enable all logic related to the CSINode API object in storage.k8s.io
|
// Enable all logic related to the CSINode API object in storage.k8s.io
|
||||||
CSINodeInfo featuregate.Feature = "CSINodeInfo"
|
CSINodeInfo featuregate.Feature = "CSINodeInfo"
|
||||||
|
|
||||||
@ -534,7 +535,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
NodeDisruptionExclusion: {Default: false, PreRelease: featuregate.Alpha},
|
NodeDisruptionExclusion: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
MountContainers: {Default: false, PreRelease: featuregate.Alpha},
|
MountContainers: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
CSIDriverRegistry: {Default: true, PreRelease: featuregate.Beta},
|
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},
|
BlockVolume: {Default: true, PreRelease: featuregate.Beta},
|
||||||
StorageObjectInUseProtection: {Default: true, PreRelease: featuregate.GA},
|
StorageObjectInUseProtection: {Default: true, PreRelease: featuregate.GA},
|
||||||
ResourceLimitsPriorityFunction: {Default: false, PreRelease: featuregate.Alpha},
|
ResourceLimitsPriorityFunction: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
|
@ -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.
|
// TestUninstallCSIDriver tests UninstallCSIDriver with various existing Node and/or CSINode objects.
|
||||||
func TestUninstallCSIDriver(t *testing.T) {
|
func TestUninstallCSIDriver(t *testing.T) {
|
||||||
testcases := []testcase{
|
testcases := []testcase{
|
||||||
@ -829,54 +773,6 @@ func TestUninstallCSIDriver(t *testing.T) {
|
|||||||
test(t, false /* addNodeInfo */, true /* csiNodeInfoEnabled */, testcases)
|
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) {
|
func TestSetMigrationAnnotation(t *testing.T) {
|
||||||
testcases := []struct {
|
testcases := []struct {
|
||||||
name string
|
name string
|
||||||
|
Loading…
Reference in New Issue
Block a user