New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable in-tree plugin without enabling CSI migration #98243
Conversation
4efdb6b
to
8cead17
Compare
/cc @gnufied @xing-yang |
/cc @divyenpatel |
/remove-sig api-machinery |
cmd/kubelet/app/plugins_providers.go
Outdated
if err != nil { | ||
klog.Warningf("Unexpected CSI Migration Feature Flags combination detected: %v. CSI Migration may not take effect", err) | ||
// TODO: fail and return here once alpha only tests can set the feature flags for a plugin correctly | ||
} | ||
if featureGate.Enabled(features.CSIMigration) && featureGate.Enabled(pluginMigration) && featureGate.Enabled(pluginMigrationComplete) { | ||
klog.Infof("Skip registration of plugin %s since feature flag %v is enabled", inTreePluginName, pluginMigrationComplete) | ||
if featureGate.Enabled(pluginInfo.pluginUnregisterFeature) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we combine this and the vSphere-specific check at line 53 into a single function in csimigration? Then instead of copying these two stanzas across cmd/kubelet, cmd/kube-controller-manager, etc etc we have the logic consolidated into one place. That will make it easier to remove the vSphere flag anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
8cead17
to
e48e367
Compare
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…omplete for Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…re{Disk,File}Complete See for more details: kubernetes/kubernetes#98243
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…re{Disk,File}Complete See for more details: kubernetes/kubernetes#98243
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
…re{Disk,File}Complete See for more details: kubernetes/kubernetes#98243
…omplete for Kubernetes >= 1.21 See for more details: kubernetes/kubernetes#98243
A bunch of flags were removed/renamed by kubernetes/kubernetes#98243
@Jiawei0227 @msau42 We(Azure disk & file drivers) would like to Enable both the InTreePluginXXUnregister and CSIMigrationXXX, while block in-tree Azure Disk & file dynamic PV creation, is that possible? One solution could be add one special tag in |
anyway, I worked out a PR to add a migration flag in csi migration logic: #103768, and then CSI driver could decide whether disable CreateVolume for csi migrated PV requests. |
If you enable both
I dont think this is necessary, why do you want to do this? Enabling |
@Jiawei0227 thanks for the clarification, so if both |
Enabling both flags means provisioning with in-tree API will go through the CSI driver. |
@andyzhangx , Sorry for the late reply. Enable both means, all intree traffic will be redirected to CSI driver. The intree will not even be registered. So the intree code will never be able to execute anymore. |
@Jiawei0227 I tried |
the kubernetes/pkg/controller/volume/attachdetach/util/util.go Lines 333 to 338 in c592bd4
|
What type of PR is this?
/kind feature
What this PR does / why we need it:
This commit replaces all the alpha CSIMigrationXXXComplete
flag with InTreePluginXXUnregister flag. This new flag will
be a superset of the CSIMigrationXXXComplete. But this
decouple the plugin unregister from CSI migration. So
if a K8s distribution want to go directly with CSI and
do not support in-tree, they can use this flag directly.
For the only beta feature CSIMigrationvSphereComplete, we
deprecate it and it will be removed in 1.22.
Testing:
verify that the PVC using old plugin name will have error
saying cannot find the plugin
verify that the PVC using old plugin name will start to use
the migrated CSI plugin
Which issue(s) this PR fixes:
Fixes #96730
Special notes for your reviewer:
We will deprecate the CSIMigrationvSphereComplete feature flag.
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
TODO:
Remove CSIMigrationvSphereComplete flag after deprecation over.
/sig storage
/assign @msau42 @mattcary