Refactor CSI migration plugin manager to get featureGates as a parameter

This allows caller to provide fake ones for testing of various corner cases
(migration on A/D controller disabled while enabled on kubelet).
This commit is contained in:
Jan Safranek
2021-03-08 13:49:57 +01:00
parent a517eccd9f
commit 219cbc818a
11 changed files with 33 additions and 28 deletions

View File

@@ -379,7 +379,7 @@ func startVolumeExpandController(ctx ControllerContext) (http.Handler, bool, err
ctx.Cloud,
plugins,
csiTranslator,
csimigration.NewPluginManager(csiTranslator),
csimigration.NewPluginManager(csiTranslator, utilfeature.DefaultFeatureGate),
filteredDialOptions,
)