acknowledge that creation of a restmapper can fail and that we cannot have a default

This commit is contained in:
David Eads
2018-04-30 08:04:43 -04:00
parent ef0d1ab819
commit 1cb797e355
26 changed files with 130 additions and 85 deletions

View File

@@ -19,7 +19,6 @@ package rollout
import (
"io"
"k8s.io/apimachinery/pkg/api/meta"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/kubectl"
@@ -41,7 +40,6 @@ type UndoOptions struct {
ToPrinter func(string) (printers.ResourcePrinterFunc, error)
Rollbackers []kubectl.Rollbacker
Mapper meta.RESTMapper
Infos []*resource.Info
ToRevision int64
DryRun bool
@@ -107,7 +105,6 @@ func (o *UndoOptions) CompleteUndo(f cmdutil.Factory, cmd *cobra.Command, out io
}
o.ToRevision = cmdutil.GetFlagInt64(cmd, "to-revision")
o.Mapper = f.RESTMapper()
o.Out = out
o.DryRun = cmdutil.GetDryRunFlag(cmd)