mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-21 01:26:28 +00:00
Get rid of meta.KindToResource in rollingupdate
This commit is contained in:
parent
2371a70b7a
commit
20df61009d
@ -28,7 +28,6 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
"k8s.io/apimachinery/pkg/api/meta"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
@ -385,12 +384,7 @@ func RunRollingUpdate(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args
|
|||||||
if outputFormat != "" {
|
if outputFormat != "" {
|
||||||
return f.PrintObject(cmd, mapper, newRc, out)
|
return f.PrintObject(cmd, mapper, newRc, out)
|
||||||
}
|
}
|
||||||
kinds, _, err := api.Scheme.ObjectKinds(newRc)
|
cmdutil.PrintSuccess(mapper, false, out, "replicationcontrollers", oldName, dryrun, message)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
_, res := meta.KindToResource(kinds[0])
|
|
||||||
cmdutil.PrintSuccess(mapper, false, out, res.Resource, oldName, dryrun, message)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user