mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
add feature gate for azure disk
fix gofmt error
This commit is contained in:
parent
e65fba6499
commit
6f2902e0a3
@ -417,6 +417,12 @@ const (
|
|||||||
// Enables the AWS EBS in-tree driver to AWS EBS CSI Driver migration feature.
|
// Enables the AWS EBS in-tree driver to AWS EBS CSI Driver migration feature.
|
||||||
CSIMigrationAWS featuregate.Feature = "CSIMigrationAWS"
|
CSIMigrationAWS featuregate.Feature = "CSIMigrationAWS"
|
||||||
|
|
||||||
|
// owner: @andyzhangx
|
||||||
|
// alpha: v1.15
|
||||||
|
//
|
||||||
|
// Enables the Azure Disk in-tree driver to Azure Disk Driver migration feature.
|
||||||
|
CSIMigrationAzureDisk featuregate.Feature = "CSIMigrationAzureDisk"
|
||||||
|
|
||||||
// owner: @RobertKrawitz
|
// owner: @RobertKrawitz
|
||||||
// beta: v1.15
|
// beta: v1.15
|
||||||
//
|
//
|
||||||
@ -496,6 +502,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
CSIMigration: {Default: false, PreRelease: featuregate.Alpha},
|
CSIMigration: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
CSIMigrationGCE: {Default: false, PreRelease: featuregate.Alpha},
|
CSIMigrationGCE: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
CSIMigrationAWS: {Default: false, PreRelease: featuregate.Alpha},
|
CSIMigrationAWS: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
|
CSIMigrationAzureDisk: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
RunAsGroup: {Default: true, PreRelease: featuregate.Beta},
|
RunAsGroup: {Default: true, PreRelease: featuregate.Beta},
|
||||||
CSIMigrationOpenStack: {Default: false, PreRelease: featuregate.Alpha},
|
CSIMigrationOpenStack: {Default: false, PreRelease: featuregate.Alpha},
|
||||||
VolumeSubpath: {Default: true, PreRelease: featuregate.GA},
|
VolumeSubpath: {Default: true, PreRelease: featuregate.GA},
|
||||||
|
@ -29,6 +29,8 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
|
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||||
|
"k8s.io/kubernetes/pkg/features"
|
||||||
"k8s.io/kubernetes/pkg/volume"
|
"k8s.io/kubernetes/pkg/volume"
|
||||||
"k8s.io/kubernetes/pkg/volume/util"
|
"k8s.io/kubernetes/pkg/volume/util"
|
||||||
"k8s.io/legacy-cloud-providers/azure"
|
"k8s.io/legacy-cloud-providers/azure"
|
||||||
@ -119,7 +121,8 @@ func (plugin *azureDataDiskPlugin) CanSupport(spec *volume.Spec) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (plugin *azureDataDiskPlugin) IsMigratedToCSI() bool {
|
func (plugin *azureDataDiskPlugin) IsMigratedToCSI() bool {
|
||||||
return false
|
return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) &&
|
||||||
|
utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureDisk)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (plugin *azureDataDiskPlugin) RequiresRemount() bool {
|
func (plugin *azureDataDiskPlugin) RequiresRemount() bool {
|
||||||
|
@ -27,9 +27,10 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
inTreePlugins = map[string]plugins.InTreePlugin{
|
inTreePlugins = map[string]plugins.InTreePlugin{
|
||||||
plugins.GCEPDDriverName: plugins.NewGCEPersistentDiskCSITranslator(),
|
plugins.GCEPDDriverName: plugins.NewGCEPersistentDiskCSITranslator(),
|
||||||
plugins.AWSEBSDriverName: plugins.NewAWSElasticBlockStoreCSITranslator(),
|
plugins.AWSEBSDriverName: plugins.NewAWSElasticBlockStoreCSITranslator(),
|
||||||
plugins.CinderDriverName: plugins.NewOpenStackCinderCSITranslator(),
|
plugins.CinderDriverName: plugins.NewOpenStackCinderCSITranslator(),
|
||||||
|
plugins.AzureDiskDriverName: plugins.NewAzureDiskCSITranslator(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user