From 3af6b94b1cd10fd16f5312aba4628d02c2c275bb Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 10 Sep 2021 16:48:32 +0200 Subject: [PATCH] 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. --- cmd/kube-controller-manager/app/core.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kube-controller-manager/app/core.go b/cmd/kube-controller-manager/app/core.go index 8b1b7a15866..772bdb8a773 100644 --- a/cmd/kube-controller-manager/app/core.go +++ b/cmd/kube-controller-manager/app/core.go @@ -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)