@@ -93,10 +93,6 @@ func NewCmdNode() *cobra.Command {
93
93
// command help, adding --skip-phases flag and by adding phases subcommands
94
94
nodeRunner .BindToCommand (cmd )
95
95
96
- // upgrade node config command is subject to GA deprecation policy, so we should deprecate it
97
- // and keep it here for one year or three releases - the longer of the two - starting from v1.15 included
98
- cmd .AddCommand (NewCmdUpgradeNodeConfig ())
99
-
100
96
return cmd
101
97
}
102
98
@@ -195,41 +191,3 @@ func (d *nodeData) Client() clientset.Interface {
195
191
func (d * nodeData ) KustomizeDir () string {
196
192
return d .kustomizeDir
197
193
}
198
-
199
- // NewCmdUpgradeNodeConfig returns the cobra.Command for downloading the new/upgrading the kubelet configuration from the kubelet-config-1.X
200
- // ConfigMap in the cluster
201
- // TODO: to remove when 1.18 is released
202
- func NewCmdUpgradeNodeConfig () * cobra.Command {
203
- nodeOptions := newNodeOptions ()
204
- nodeRunner := workflow .NewRunner ()
205
-
206
- cmd := & cobra.Command {
207
- Use : "config" ,
208
- Short : "Download the kubelet configuration from the cluster ConfigMap kubelet-config-1.X, where X is the minor version of the kubelet" ,
209
- Deprecated : "use \" kubeadm upgrade node\" instead" ,
210
- RunE : func (cmd * cobra.Command , args []string ) error {
211
- // This is required for preserving the old behavior of `kubeadm upgrade node config`.
212
- // The new implementation exposed as a phase under `kubeadm upgrade node` infers the target
213
- // kubelet config version from the kubeadm-config ConfigMap
214
- if len (nodeOptions .kubeletVersion ) == 0 {
215
- return errors .New ("the --kubelet-version argument is required" )
216
- }
217
-
218
- return nodeRunner .Run (args )
219
- },
220
- }
221
-
222
- // adds flags to the node command
223
- addUpgradeNodeFlags (cmd .Flags (), nodeOptions )
224
-
225
- // initialize the workflow runner with the list of phases
226
- nodeRunner .AppendPhase (phases .NewKubeletConfigPhase ())
227
-
228
- // sets the data builder function, that will be used by the runner
229
- // both when running the entire workflow or single phases
230
- nodeRunner .SetDataInitializer (func (cmd * cobra.Command , args []string ) (workflow.RunData , error ) {
231
- return newNodeData (cmd , args , nodeOptions )
232
- })
233
-
234
- return cmd
235
- }
0 commit comments