mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
kubeadm: remove the deprecated "update-status" phase of "join"
The phase has been deprecated and a NO-OP for 3+ years.
This commit is contained in:
parent
77f7d1b89d
commit
917c8d67c5
@ -25,7 +25,6 @@ import (
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/options"
|
||||
"k8s.io/kubernetes/cmd/kubeadm/app/cmd/phases/workflow"
|
||||
cmdutil "k8s.io/kubernetes/cmd/kubeadm/app/cmd/util"
|
||||
kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
|
||||
etcdphase "k8s.io/kubernetes/cmd/kubeadm/app/phases/etcd"
|
||||
markcontrolplanephase "k8s.io/kubernetes/cmd/kubeadm/app/phases/markcontrolplane"
|
||||
etcdutil "k8s.io/kubernetes/cmd/kubeadm/app/util/etcd"
|
||||
@ -69,7 +68,6 @@ func NewControlPlaneJoinPhase() workflow.Phase {
|
||||
ArgsValidator: cobra.NoArgs,
|
||||
},
|
||||
newEtcdLocalSubphase(),
|
||||
newUpdateStatusSubphase(),
|
||||
newMarkControlPlaneSubphase(),
|
||||
},
|
||||
}
|
||||
@ -85,19 +83,6 @@ func newEtcdLocalSubphase() workflow.Phase {
|
||||
}
|
||||
}
|
||||
|
||||
func newUpdateStatusSubphase() workflow.Phase {
|
||||
return workflow.Phase{
|
||||
Name: "update-status",
|
||||
Short: fmt.Sprintf(
|
||||
"Register the new control-plane node into the ClusterStatus maintained in the %s ConfigMap (DEPRECATED)",
|
||||
kubeadmconstants.KubeadmConfigConfigMap,
|
||||
),
|
||||
Run: runUpdateStatusPhase,
|
||||
InheritFlags: getControlPlaneJoinPhaseFlags("update-status"),
|
||||
ArgsValidator: cobra.NoArgs,
|
||||
}
|
||||
}
|
||||
|
||||
func newMarkControlPlaneSubphase() workflow.Phase {
|
||||
return workflow.Phase{
|
||||
Name: "mark-control-plane",
|
||||
@ -159,19 +144,6 @@ func runEtcdPhase(c workflow.RunData) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func runUpdateStatusPhase(c workflow.RunData) error {
|
||||
data, ok := c.(JoinData)
|
||||
if !ok {
|
||||
return errors.New("control-plane-join phase invoked with an invalid data struct")
|
||||
}
|
||||
|
||||
if data.Cfg().ControlPlane != nil {
|
||||
fmt.Println("The 'update-status' phase is deprecated and will be removed in a future release. " +
|
||||
"Currently it performs no operation")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func runMarkControlPlanePhase(c workflow.RunData) error {
|
||||
data, ok := c.(JoinData)
|
||||
if !ok {
|
||||
|
Loading…
Reference in New Issue
Block a user