kube-controller-manager: properly check generic ephemeral volume feature

Due to a cut-and-paste error in the original implementation in Kubernetes 1.19,
support for generic ephemeral inline volumes in the PVC protection controller
was incorrectly tied to the "storage object in use" feature gate.
This commit is contained in:
Patrick Ohly 2021-09-10 16:48:32 +02:00
parent 1dcea5cb02
commit 3af6b94b1c

View File

@ -576,7 +576,7 @@ func startPVCProtectionController(ctx ControllerContext) (controller.Interface,
ctx.InformerFactory.Core().V1().Pods(),
ctx.ClientBuilder.ClientOrDie("pvc-protection-controller"),
utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection),
utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection),
utilfeature.DefaultFeatureGate.Enabled(features.GenericEphemeralVolume),
)
if err != nil {
return nil, true, fmt.Errorf("failed to start the pvc protection controller: %v", err)