You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This reverts commit a89e202 and adds
the CLI flag `--allow-pv-rebinding` to opt into the un-reverted
functionality.
A recent incident hit an exceptional edge case where all redpanda Pods where
temporarily stuck in "Pending". Their underlying Nodes were marked as
"NotReady" which caused the TaintManager to evict said Pods and prevented them
from being rescheduled. The unbinder functioned as expected but due to the
reverted commit the still existing PVs were not eligible for rebinding. As a
result, a new cluster was formed.
The original motivation for the reverted commit was due to an edge case where a
Node's name was reused in EKS due to using Node IPs as their name. Our cloud
has since begun using the instance ID as the Node name. To remain on the
conservative side, we've opted to make this functionality opt in.
cmd.Flags().StringSliceVar(&additionalControllers, "additional-controllers", []string{""}, fmt.Sprintf("which controllers to run, available: all, %s", strings.Join(availableControllers, ", ")))
264
266
cmd.Flags().BoolVar(&operatorMode, "operator-mode", true, "enables to run as an operator, setting this to false will disable cluster (deprecated), redpanda resources reconciliation.")
265
267
cmd.Flags().DurationVar(&unbindPVCsAfter, "unbind-pvcs-after", 0, "if not zero, runs the PVCUnbinder controller which attempts to 'unbind' the PVCs' of Pods that are Pending for longer than the given duration")
268
+
cmd.Flags().BoolVar(&allowPVRebinding, "allow-pv-rebinding", false, "controls whether or not PVs unbound by the PVCUnbinder have their .ClaimRef cleared, which allows them to be reused")
266
269
cmd.Flags().Var(&unbinderSelector, "unbinder-label-selector", "if provided, a Kubernetes label selector that will filter Pods to be considered by the PVCUnbinder.")
267
270
cmd.Flags().BoolVar(&autoDeletePVCs, "auto-delete-pvcs", false, "Use StatefulSet PersistentVolumeClaimRetentionPolicy to auto delete PVCs on scale down and Cluster resource delete.")
268
271
cmd.Flags().StringVar(&webhookCertPath, "webhook-cert-path", "", "The directory that contains the webhook certificate.")
@@ -329,6 +332,7 @@ func Run(
329
332
ghostbusterbool,
330
333
unbindPVCsAfter time.Duration,
331
334
unbinderSelector labels.Selector,
335
+
allowPVRebindingbool,
332
336
autoDeletePVCsbool,
333
337
pprofAddrstring,
334
338
webhookCertPathstring,
@@ -684,14 +688,15 @@ func Run(
684
688
685
689
// The unbinder gets to run in any mode, if it's enabled.
686
690
ifunbindPVCsAfter<=0 {
687
-
setupLog.Info("PVCUnbinder controller not active", "unbind-after", unbindPVCsAfter, "selector", unbinderSelector)
691
+
setupLog.Info("PVCUnbinder controller not active", "unbind-after", unbindPVCsAfter, "selector", unbinderSelector, "allow-pv-rebinding", allowPVRebinding)
0 commit comments