From 15c57927c8f6becb3e9585d2bcd9b3b50d41b7a7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Mon, 11 Jan 2021 13:04:13 +0100 Subject: [PATCH] Update the deprecated DeleteLocalData DeleteLocalData was deprecated for users of kubectl in 0.20 [1]. At the same time of the deprecation, the relevant code was also removed [2] without warning: The DeleteLocalData from the helper structure was simply renamed DeleteEmptyDirData, without shims on the exposed pkg. This is a problem, as it completely breaks kured. This should fix it, by using the new field name. [1]: https://github.com/kubernetes/kubectl/commit/56ea9621b7fc333d2d2dde8ae39c15cacf28dbf7 [2]: https://github.com/kubernetes/kubectl/commit/56ea9621b7fc333d2d2dde8ae39c15cacf28dbf7#diff-041bdcdedca650a38a8d82cf15ab6f3665b7b84a0fb44a8bb5dcdc5cd944c63d --- cmd/kured/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kured/main.go b/cmd/kured/main.go index 1ef45b0..7760f6d 100644 --- a/cmd/kured/main.go +++ b/cmd/kured/main.go @@ -272,7 +272,7 @@ func drain(client *kubernetes.Clientset, node *v1.Node) { Client: client, GracePeriodSeconds: -1, Force: true, - DeleteLocalData: true, + DeleteEmptyDirData: true, IgnoreAllDaemonSets: true, ErrOut: os.Stderr, Out: os.Stdout,